 |
|
Senior Member
Join Date: Apr 2010
Location: China
|

04-07-2020
, 16:26
Re: [NMRiH]Admins are not infected by zombie attacks
|
#3
|
Quote:
Originally Posted by Grey83
PHP Code:
public void OnPluginStart()
{
HookEvent("player_spawn", Event_Spawn);
}
public void Event_Spawn(Event event, const char[] name, bool dontBroadcast)
{
static int userID, client;
if((client = GetClientOfUserId((userID = event.GetInt("userid")))) && GetUserAdmin(client) != INVALID_ADMIN_ID)
CreateTimer(1.0, VaccinateAdmin, userID);
}
public Action VaccinateAdmin(Handle timer, any client)
{
if((client = GetClientOfUserId(client)) && IsPlayerAlive(client))
SetEntProp(client, Prop_Send, "_vaccinated", 1);
}
|
thank you
__________________
I like this BBS sharing of spirit
I come from China, my English is poor
|
|
|
|