Cos takiego : ?
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <sdkhooks>
bool g_granat [MAXPLAYERS];
public void OnPluginStart()
{
HookEvent("player_spawn", Player_Spawn);
RegConsoleCmd("sm_granat", CMD_DAJMNIEGRANATA);
}
public Action Player_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
g_granat[client]=false;
}
public Action CMD_DAJMNIEGRANATA (int client, int args)
{
if(!g_granat[client])
{
GivePlayerItem(client, "weapon_smoke");
g_granat[client]=true;
}
else
{
PrintToChat(client,"O NIE!!!, DOSTEPNE RAZ NA RUNDE");
}
}