Raised This Month: $ Target: $400
 0% 

Help counting of players living


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Toallin
Junior Member
Join Date: Jun 2014
Old 06-21-2014 , 22:21   Help counting of players living
Reply With Quote #1

Best to all.

What happens is that I have a problem with the controls of players

PHP Code:
GetAlive()
{
    new 
iAlive
    
    
for(new i<= g_maxplayers; ++i)
        if(
is_user_connected(i) && is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
            
iAlive++;
        
    return 
iAlive;

to put it into a hud if players live shows
PHP Code:
show_hudmessage(0"Alive %d"GetAlive()) 
But when I try to open a menu does not work

PHP Code:
public ShowMenu(id)
{
        if(
GetAlive() = 1)
        {
                new 
menu menu_create("New Menu""CmdNewMenu")

                
menu_additem("Option 1""1")

                
menu_display(idmenu)
        }
        return 
PLUGIN_HANDLED;       

Someone tell me the error
thanks
Toallin is offline
 


Thread Tools
Display Modes

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 21:14.


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