Raised This Month: $ Target: $400
 0% 

code help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nike24
Member
Join Date: Oct 2011
Old 10-01-2012 , 12:38   code help
Reply With Quote #1

please help me with that it code from mod it compiled but it not working in the server
PHP Code:
public RoundEnd(id)
{
    for(new 
<= g_max_clients i++)
        if(
IsPlayer(i) && is_user_connected(i) && cs_get_user_team(i) == CS_TEAM_CT && is_user_alive(i)) {
        
ColorChat(i,"You survived the round!")
    }

Nike24 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 10-01-2012 , 13:05   Re: code help
Reply With Quote #2

Quote:
Originally Posted by Nike24 View Post
PHP Code:
public RoundEnd(id)
{
    for(new 
<= g_max_clients i++)
    {
        if(
IsPlayer(i) && is_user_connected(i) && cs_get_user_team(i) == CS_TEAM_CT && is_user_alive(i)) 
            
ColorChat(i,"You survived the round!")
    }

I fixed your code.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 10-01-2012 , 14:23   Re: code help
Reply With Quote #3

Use get_players instead of this. Really more efficient.
__________________
micapat is offline
tigo bitties
Member
Join Date: Sep 2012
Old 10-01-2012 , 15:43   Re: code help
Reply With Quote #4

You don't need both "is_user_connected" and "is_user_alive". If he is alive he must be connected.
tigo bitties 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 04:28.


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