Small fixes
This commit is contained in:
parent
bf93a52f24
commit
9422304a42
@ -102,6 +102,9 @@ public Action OnCheatCommand(int client, const char[] command, int argc)
|
||||
if(!argc && (StrEqual(command, "kill") || StrEqual(command, "explode")))
|
||||
return Plugin_Continue;
|
||||
|
||||
if(StrEqual(command, "setang"))
|
||||
return Plugin_Continue;
|
||||
|
||||
if(!IsClientAuthorized(client) || !CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
||||
return Plugin_Handled;
|
||||
|
||||
|
@ -247,11 +247,8 @@ public MRESReturn AcceptInput(int pThis, Handle hReturn, Handle hParams)
|
||||
|
||||
public void Event_Spawn(Event event, const char[] name, bool dontBroadcast)
|
||||
{
|
||||
int client = GetClientOfUserId(GetEventInt(event, "userid"));
|
||||
if(!client)
|
||||
return;
|
||||
|
||||
CreateTimer(0.1, Timer_SpawnPost, client, TIMER_FLAG_NO_MAPCHANGE);
|
||||
int userid = GetEventInt(event, "userid");
|
||||
CreateTimer(0.1, Timer_SpawnPost, userid);
|
||||
}
|
||||
|
||||
public void Event_Death(Event event, const char[] name, bool dontBroadcast)
|
||||
@ -263,8 +260,12 @@ public void Event_Death(Event event, const char[] name, bool dontBroadcast)
|
||||
g_Client_bEnabled[client] = false;
|
||||
}
|
||||
|
||||
public Action Timer_SpawnPost(Handle timer, int client)
|
||||
public Action Timer_SpawnPost(Handle timer, int userid)
|
||||
{
|
||||
int client = GetClientOfUserId(userid);
|
||||
if(!client)
|
||||
return;
|
||||
|
||||
if(!IsClientInGame(client) || !IsPlayerAlive(client))
|
||||
return Plugin_Stop;
|
||||
|
||||
|
@ -33,6 +33,7 @@ public void OnPluginStart()
|
||||
HookEvent("player_spawn", Event_Spawn, EventHookMode_Post);
|
||||
|
||||
AutoExecConfig(true);
|
||||
RadarModeChanged(g_cRadarMode, "", "");
|
||||
}
|
||||
|
||||
public void RadarModeChanged(ConVar cvar, const char[] sOldVal, const char[] sNewVal)
|
||||
|
Loading…
Reference in New Issue
Block a user