Raised This Month: $ Target: $400
 0% 

Dont revive


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gamelaster
Junior Member
Join Date: Aug 2010
Old 08-31-2012 , 05:28   Dont revive
Reply With Quote #1

Hi, i be dead but dont revive.... I dont know why..
PHP Code:
 
public plugin_init()
{
...
    
register_event("DeathMsg","EventDeath","a");
...
    
g_MaxPlayers get_maxplayers();
...
}

GetAlivePlayers()
{
        new 
Count;
 
        for (new 
Client 1Client <= g_MaxPlayersClient++)
                if (
is_user_alive(Client))
                        
Count++;
 
        return 
Count;
}  

public 
EventDeath(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_CT)
    {
        if(
zivoty != 0)
        {
            if(
GetAlivePlayers() >> 2)
            {
                
set_task(5.0,"oziv");
            }
        }
    }
    return 
PLUGIN_CONTINUE;
}
public 
oziv(id)
{
    
ExecuteHam(Ham_Spawnid)

Thanx
gamelaster is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-31-2012 , 05:33   Re: Dont revive
Reply With Quote #2

PHP Code:
if(GetAlivePlayers() >> 2)

Shouldn't it not be ..

PHP Code:
if (GetAlivePlayers() > 2)

?
Torge is offline
gamelaster
Junior Member
Join Date: Aug 2010
Old 08-31-2012 , 05:34   Re: Dont revive
Reply With Quote #3

Oh Crap, im idiot..... I test and thanx
gamelaster is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 08-31-2012 , 05:37   Re: Dont revive
Reply With Quote #4

Quote:
Originally Posted by gamelaster View Post
Oh Crap, im idiot..... I test and thanx
you never pass the index in "set_task"
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
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 05:43.


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