Small fixes
This commit is contained in:
parent
576a6b5049
commit
0af43b367d
@ -102,6 +102,9 @@ public Action OnCheatCommand(int client, const char[] command, int argc)
|
|||||||
if(!argc && (StrEqual(command, "kill") || StrEqual(command, "explode")))
|
if(!argc && (StrEqual(command, "kill") || StrEqual(command, "explode")))
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
|
|
||||||
|
if(StrEqual(command, "setang"))
|
||||||
|
return Plugin_Continue;
|
||||||
|
|
||||||
if(!IsClientAuthorized(client) || !CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
if(!IsClientAuthorized(client) || !CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
||||||
return Plugin_Handled;
|
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)
|
public void Event_Spawn(Event event, const char[] name, bool dontBroadcast)
|
||||||
{
|
{
|
||||||
int client = GetClientOfUserId(GetEventInt(event, "userid"));
|
int userid = GetEventInt(event, "userid");
|
||||||
if(!client)
|
CreateTimer(0.1, Timer_SpawnPost, userid);
|
||||||
return;
|
|
||||||
|
|
||||||
CreateTimer(0.1, Timer_SpawnPost, client, TIMER_FLAG_NO_MAPCHANGE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Event_Death(Event event, const char[] name, bool dontBroadcast)
|
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;
|
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))
|
if(!IsClientInGame(client) || !IsPlayerAlive(client))
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ public void OnPluginStart()
|
|||||||
HookEvent("player_spawn", Event_Spawn, EventHookMode_Post);
|
HookEvent("player_spawn", Event_Spawn, EventHookMode_Post);
|
||||||
|
|
||||||
AutoExecConfig(true);
|
AutoExecConfig(true);
|
||||||
|
RadarModeChanged(g_cRadarMode, "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RadarModeChanged(ConVar cvar, const char[] sOldVal, const char[] sNewVal)
|
public void RadarModeChanged(ConVar cvar, const char[] sOldVal, const char[] sNewVal)
|
||||||
|
Loading…
Reference in New Issue
Block a user