Quote:
Originally Posted by Markiez
Why not just?
Code:
#include <sourcemod>
#pragma semicolon 1
bool Ready;
public void OnPluginStart()
{
HookEvent( "player_disconnect", Event_Disconnect, EventHookMode_Pre);
RegConsoleCmd("sm_ready", Cmd_Ready);
}
public Action Cmd_Ready(int client, int args)
{
Ready = true;
}
public Action Event_Disconnect(Event event, const char[] name, bool dbc)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (Ready)
{
Ready = false;
return;
}
BanClient(client, 1440, BANFLAG_AUTO, "some shit here");
}
|
You need to make an array for the Boolean for each client on the server to have its own value.
EDIT: You should also add return Plugin_Handled to the command's callback to register the command in the game's engine.