Proszę:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#include <cstrike>
public Plugin:myinfo =
{
name = "Usuwa bronie zostaje noz",
author = "xBBBay",
description = "",
version = "1.0",
url = "http://steamcommunity.com/id/xbbbay"
};
public OnPluginStart()
{
HookEvent("player_spawn", PlayerSpawn);
}
public Action:PlayerSpawn(Handle:event_spawn, String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event_spawn, "userid"));
if(!IsValidClient(client) || IsFakeClient(client))
return;
for(new slot = 0; slot < 4; slot ++)
{
new weapon_index = -1;
while((weapon_index = GetPlayerWeaponSlot(client, slot)) != -1)
{
if(IsValidEntity(weapon_index))
{
RemovePlayerItem(client, weapon_index);
AcceptEntityInput(weapon_index, "kill");
}
}
}
GivePlayerItem(client, "weapon_knife");
}
public bool IsValidClient(int client)
{
if(client >= 1 && client <= MaxClients && IsClientInGame(client))
return true;
return false;
}
Można lepiej napisać, ważne że działa :)