Raised This Month: $ Target: $400
 0% 

is_user_alive && get_pcvar_num


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CHE4TER
Member
Join Date: Jul 2013
Location: Portugal
Old 06-01-2014 , 11:57   is_user_alive && get_pcvar_num
Reply With Quote #1

What I'm doing wrong?
If the cvar is set to 1, the colorchat is displayed, it must display only if the player is not alive and cvar is set to 0

PHP Code:
public menuAdmin_handler(idmenu,item)
{
    switch(
item)
    {
        case 
0:
        {
            
// Check if Player is alive & CVARs that alow change team while alive/unalive
            
if(is_user_alive(id) && get_pcvar_num(sm_changeteam_alive) == 1changeTeam(id)
            if(
is_user_alive(id) && get_pcvar_num(sm_changeteam_alive) == 0changeTeam(id)
            else 
ColorChat(idNORMAL"You must be alive!")
            
sayMenu(id)
        }
    }


Last edited by CHE4TER; 06-02-2014 at 07:27.
CHE4TER is offline
 



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 09:36.


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