mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
Removal of timer from players upon spawn
This commit is contained in:
parent
835f19fb1b
commit
5b2b10c60f
@ -25,6 +25,7 @@
|
||||
|
||||
#define USES_STYLE_NAMES
|
||||
#define USES_STYLE_PROPERTIES
|
||||
#define HIDE_RADAR 1<<12
|
||||
#include <shavit>
|
||||
|
||||
#undef REQUIRE_EXTENSIONS
|
||||
@ -689,10 +690,16 @@ public void Player_Spawn(Handle event, const char[] name, bool dontBroadcast)
|
||||
|
||||
int userid = GetEventInt(event, "userid");
|
||||
int client = GetClientOfUserId(userid);
|
||||
|
||||
CreateTimer(0.0, RemoveRadar, client);
|
||||
RestartTimer(client);
|
||||
}
|
||||
|
||||
public Action RemoveRadar(Handle timer, any client)
|
||||
{
|
||||
SetEntProp(client, Prop_Send, "m_iHideHUD", GetEntProp(client, Prop_Send, "m_iHideHUD") | HIDE_RADAR);
|
||||
}
|
||||
|
||||
|
||||
public Action Player_Team(Handle event, const char[] name, bool dontBroadcast)
|
||||
{
|
||||
if(gCV_HideTeamChanges.BoolValue)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user