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

user spectator help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
asdfdsdf
AlliedModders Donor
Join Date: Aug 2010
Location: Belgium
Old 10-16-2013 , 07:04   user spectator help
Reply With Quote #1

Hi i need in this code so specators cant be respawned and doesnt show up in menu i think its only in this piece of code i need to change something on the if statement but i dont know how to cal when user is spectator if someone can help me





PHP Code:
if ( player && !is_user_aliveplayer )) 
    {  
        
g_bAdminRespawnedplayer ] = true;  
        
ExecuteHamBHam_CS_RoundRespawnplayer );  
         
        new 
plName[32], aName[32]; 
        
get_user_name(playerplNamecharsmax(plName)); 
        
get_user_name(idaNamecharsmax(aName)); 
         
        
PrintColor(0"!gFa!y: !t%s !yrespawned !t%s"aNameplName); 
    } 
asdfdsdf is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 10-16-2013 , 09:13   Re: user spectator help
Reply With Quote #2

Use (cs_)get_user_team()
mottzi is offline
Send a message via MSN to mottzi
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 10-16-2013 , 12:30   Re: user spectator help
Reply With Quote #3

#define isPlayer(%0) (CS_TEAM_T <= cs_get_user_team(%0) <= CS_TEAM_CT)

if(!isPlayer) return;
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 00:10.


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