Raised This Month: $ Target: $400
 0% 

Error Respawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bello2
Senior Member
Join Date: Jun 2010
Location: Venezuela
Old 07-08-2010 , 14:03   Re: Error Respawn
Reply With Quote #10

Ok then with the macro be in this way:

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) )  

public plugin_init() 

    
register_plugin("respawn","1.0","Bello2")
    
register_event("DeathMsg","death","a"
    
register_cvar("dm_enabled","0")
    
register_cvar("dm_protection","1")
    
register_cvar("dm_protection_time","3")
}

public 
death() 

    if (
get_cvar_num("dm_enabled"))
    {
        new 
id read_data(2)
        
set_task(0.5,"revive",id)
    }
}

public 
revive(id)
{
    if (!
can_respawn(id)) return;
    
    
ExecuteHamBHam_CS_RoundRespawnid );
    
    if (
get_cvar_num("dm_protection"))
    {
        new 
Float:ProtectTime get_cvar_float("dm_protection_time")
        
        
set_user_godmodeid);
        
set_taskProtectTime "stopprotect"id );
    }
}

public 
stopprotect(id)
{
    if( 
is_user_aliveid ) )
        
set_user_godmodeid);

Or this evil? What i want to know is how I can call the macro, because i do not have much experience with the macros...

Last edited by Bello2; 07-08-2010 at 17:33.
Bello2 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