Raised This Month: $ Target: $400
 0% 

Respawn Help..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nikodz
Junior Member
Join Date: Jul 2009
Old 08-02-2010 , 17:26   Re: Respawn Help..
Reply With Quote #1

What about this?
PHP Code:
{    
    if( 
g_bRespawnUsed[id] )
    {
        
ChatColorid"%s You've already !gRespawned!y! Wait until next map!"CLAN_TAG );
        return 
PLUGIN_HANDLED;
    }
            
    else if( 
iMoney RESPAWN_COST )
    {
        
ChatColorid"%s You don't have enough !gMoney !yto buy that!"CLAN_TAG );
        
        
CmdMainMenuid );
        return 
PLUGIN_HANDLED;
    }
            
    else
    {
        if( !
is_user_aliveid ) ){

            
ExecuteHamBHam_CS_RoundRespawnid );
                
            
g_bRespawnUsed[id] = true
                
            cs_set_user_money
idiMoney RESPAWN_COST );
                
            new 
name[32]
            
get_user_nameidname31 )
                
            
ChatColor0"%s %s You have been !gRespawned!y!"CLAN_TAGname );    
        }
        return 
PLUGIN_HANDLED;
    }
            
    if( 
is_user_aliveid ) )
    {
        
ChatColor0"%s You must be dead to !gRespawn!y!"CLAN_TAG );
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;

nikodz is offline
EpicFail.
Senior Member
Join Date: May 2010
Old 08-02-2010 , 17:34   Re: Respawn Help..
Reply With Quote #2

Quote:
Originally Posted by nikodz View Post
What about this?
PHP Code:
{    
    if( 
g_bRespawnUsed[id] )
    {
        
ChatColorid"%s You've already !gRespawned!y! Wait until next map!"CLAN_TAG );
        return 
PLUGIN_HANDLED;
    }
            
    else if( 
iMoney RESPAWN_COST )
    {
        
ChatColorid"%s You don't have enough !gMoney !yto buy that!"CLAN_TAG );
        
        
CmdMainMenuid );
        return 
PLUGIN_HANDLED;
    }
            
    else
    {
        if( !
is_user_aliveid ) ){

            
ExecuteHamBHam_CS_RoundRespawnid );
                
            
g_bRespawnUsed[id] = true
                
            cs_set_user_money
idiMoney RESPAWN_COST );
                
            new 
name[32]
            
get_user_nameidname31 )
                
            
ChatColor0"%s %s You have been !gRespawned!y!"CLAN_TAGname );    
        }
        return 
PLUGIN_HANDLED;
    }
            
    if( 
is_user_aliveid ) )
    {
        
ChatColor0"%s You must be dead to !gRespawn!y!"CLAN_TAG );
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;

This work but when i alive this no say this line..
PHP Code:
 ChatColor0"%s You must be dead to !gRespawn!y!"CLAN_TAG ); 
EpicFail. is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 08-02-2010 , 17:46   Re: Respawn Help..
Reply With Quote #3

Untested

Code:
    if( g_bRespawnUsed[id] )     {          ChatColor( id, "%s You've already !gRespawned!y! Wait until next map!", CLAN_TAG );          return PLUGIN_HANDLED;     }                 else if( iMoney < RESPAWN_COST )     {          ChatColor( id, "%s You don't have enough !gMoney !yto buy that!", CLAN_TAG );                  CmdMainMenu( id );          return PLUGIN_HANDLED;     }                 else     {          if( !is_user_alive( id ) )          {               ExecuteHamB( Ham_CS_RoundRespawn, id );                               g_bRespawnUsed[id] = true                               cs_set_user_money( id, iMoney - RESPAWN_COST );                               new name[32]               get_user_name( id, name, 31 )                               ChatColor( 0, "%s %s You have been !gRespawned!y!", CLAN_TAG, name );              }            else          {               ChatColor( 0, "%s You must be dead to !gRespawn!y!", CLAN_TAG );          }            return PLUGIN_HANDLED;     } }
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 08-02-2010 at 17:48.
Devil259 is offline
EpicFail.
Senior Member
Join Date: May 2010
Old 08-02-2010 , 17:51   Re: Respawn Help..
Reply With Quote #4

Quote:
Originally Posted by Devil259 View Post
Untested

Code:
if( g_bRespawnUsed[id] ) { ChatColor( id, "%s You've already !gRespawned!y! Wait until next map!", CLAN_TAG );
return PLUGIN_HANDLED;
} else if( iMoney < RESPAWN_COST ) { ChatColor( id, "%s You don't have enough !gMoney !yto buy that!", CLAN_TAG );

CmdMainMenu( id );
return PLUGIN_HANDLED;
} else { if( !is_user_alive( id ) ) { ExecuteHamB( Ham_CS_RoundRespawn, id );

g_bRespawnUsed[id] = true cs_set_user_money( id, iMoney - RESPAWN_COST );

new name[32] get_user_name( id, name, 31 ) ChatColor( 0, "%s %s You have been !gRespawned!y!", CLAN_TAG, name );
} else { ChatColor( 0, "%s You must be dead to !gRespawn!y!", CLAN_TAG );
} return PLUGIN_HANDLED;
} }

Thanks bro your the best !!!
this work fine
EpicFail. is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 08-02-2010 , 18:03   Re: Respawn Help..
Reply With Quote #5

@nikodz : Use if ( !is_user_alive(id) // ... else

instead of

if ( !is_user_alive(id) // if ( is_user_alive(id)
__________________
You can do anything you set your mind to, man.

Devil259 is offline
nikodz
Junior Member
Join Date: Jul 2009
Old 08-03-2010 , 02:35   Re: Respawn Help..
Reply With Quote #6

PHP Code:
{     
    if( 
g_bRespawnUsed[id] ) 
    { 
        
ChatColorid"%s You've already !gRespawned!y! Wait until next map!"CLAN_TAG ); 
        return 
PLUGIN_HANDLED
    } 
    
    else if( 
iMoney RESPAWN_COST 
    { 
        
ChatColorid"%s You don't have enough !gMoney !yto buy that!"CLAN_TAG ); 
        
        
CmdMainMenuid ); 
        return 
PLUGIN_HANDLED
    } 
    
    else if( !
is_user_aliveid ) ){ 
        
        
ExecuteHamBHam_CS_RoundRespawnid ); 
        
        
g_bRespawnUsed[id] = true 
        
        cs_set_user_money
idiMoney RESPAWN_COST ); 
        
        new 
name[32
        
get_user_nameidname31 
        
        
ChatColor0"%s %s You have been !gRespawned!y!"CLAN_TAGname );     
        return 
PLUGIN_HANDLED
    } else {
        
ChatColor0"%s You must be dead to !gRespawn!y!"CLAN_TAG ); 
        return 
PLUGIN_HANDLED
    } 
    return 
PLUGIN_HANDLED


Last edited by nikodz; 08-03-2010 at 02:40.
nikodz 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 00:11.


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