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;
ExecuteHamB( Ham_CS_RoundRespawn, id );
if (get_cvar_num("dm_protection"))
{
new Float:ProtectTime = get_cvar_float("dm_protection_time")
set_user_godmode( id, 1 );
set_task( ProtectTime , "stopprotect", id );
}
}
public stopprotect(id)
{
if( is_user_alive( id ) )
set_user_godmode( id, 0 );
}
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...