Raised This Month: $ Target: $400
 0% 

Error Respawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-08-2010 , 13:54   Re: Error Respawn
Reply With Quote #9

Ok, then you have to check if player is connected du to the delayed respawn.
Little optimization on code, so you use only 1 time the team :
PHP Code:
stock can_spawn(id)
{
    if(    
is_user_connected(id)
    &&    !
is_user_alive(id)
    &&    (
CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT)    )
    {
        return 
true
    
}
    return 
false

or

PHP Code:
stock can_spawn(id)
{
    return ( 
is_user_connected(id) && !is_user_alive(id) && (CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT) )

or

PHP Code:
#define can_respawn(%1)    ( is_user_connected(%0) && !is_user_alive(%0) && (CS_TEAM_T <= cs_get_user_team(%0) <= CS_TEAM_CT) ) 
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 07:16.


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