View Single Post
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia and king's landing...
Old 01-11-2014 , 03:08   Re: Armageddon mode respawn
Reply With Quote #3

Wicho's code will respawn everybody as nemesis and survivor i think and that too it will be called only when a player connects to the server... Use this code and tell me if u have any problems... not tested :-

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zp50_core>
#include <zp50_gamemodes>
#include <zp50_class_nemesis>
#include <zp50_class_survivor>  


#define PLUGIN "Armageddon Mode Special respawn"
#define VERSION "1.0"
#define AUTHOR "Catastrophe"

#define RESP_DELAY 5.0


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Killed"player""fw_Killed")
}

public 
fw_Killed(victimattackershouldgib)
{
         if(!
is_user_alive(attacker) || zp_gamemodes_get_current() != zp_gamemodes_get_id("Armageddon Mode"))
         return
    
         if(
zp_class_survivor_get(victim))
         {
         
set_task(RESP_DELAY"do_resp1"victim)
         }
    
         if(
zp_class_nemesis_get(victim))
         {
         
set_task(RESP_DELAY"do_resp2"victim)
         }
}

public 
do_resp1(id)
{
        if(!
is_user_connected(id))
        return
    
        
ExecuteHam(Ham_CS_RoundRespawnid
        
zp_class_survivor_set(id)
         
}

public 
do_resp2(id)
{
        if(!
is_user_connected(id))
        return
    
        
ExecuteHam(Ham_CS_RoundRespawnid
        
zp_class_nemesis_set(id)
         

__________________
You will find everything u need :-

Last edited by Catastrophe; 01-11-2014 at 03:08.
Catastrophe is offline