Raised This Month: $51 Target: $400
 12% 

[NMRiH]Admins are not infected by zombie attacks


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 03-27-2020 , 18:25   [NMRiH]Admins are not infected by zombie attacks
Reply With Quote #1

No matter how zombies attack the administrator, they will not be infected.

If a player is infected, give the player a prominent outline glow to alert the administrator.
The outline glow is only visible to the administrator. Other players do not need to see the outline glow.
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 04-07-2020 , 09:46   Re: [NMRiH]Admins are not infected by zombie attacks
Reply With Quote #2

Quote:
No matter how zombies attack the administrator, they will not be infected.
PHP Code:
public void OnPluginStart()
{
    
HookEvent("player_spawn"Event_Spawn);
}

public 
void Event_Spawn(Event event, const char[] namebool dontBroadcast)
{
    static 
int userIDclient;
    if((
client GetClientOfUserId((userID event.GetInt("userid")))) && GetUserAdmin(client) != INVALID_ADMIN_ID)
        
CreateTimer(1.0VaccinateAdminuserID);
}

public 
Action VaccinateAdmin(Handle timerany client)
{
    if((
client GetClientOfUserId(client)) && IsPlayerAlive(client))
        
SetEntProp(clientProp_Send"_vaccinated"1);

__________________
Grey83 is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 04-07-2020 , 16:26   Re: [NMRiH]Admins are not infected by zombie attacks
Reply With Quote #3

Quote:
Originally Posted by Grey83 View Post
PHP Code:
public void OnPluginStart()
{
    
HookEvent("player_spawn"Event_Spawn);
}

public 
void Event_Spawn(Event event, const char[] namebool dontBroadcast)
{
    static 
int userIDclient;
    if((
client GetClientOfUserId((userID event.GetInt("userid")))) && GetUserAdmin(client) != INVALID_ADMIN_ID)
        
CreateTimer(1.0VaccinateAdminuserID);
}

public 
Action VaccinateAdmin(Handle timerany client)
{
    if((
client GetClientOfUserId(client)) && IsPlayerAlive(client))
        
SetEntProp(clientProp_Send"_vaccinated"1);

thank you
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode