Raised This Month: $344 Target: $400
 86%   Almost there!

Armageddon mode respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Korasnr
Junior Member
Join Date: May 2011
Location: Slovakia
Old 01-10-2014 , 07:23   Armageddon mode respawn
Reply With Quote #1

Hello I have Zombie Plague 5.0.8 My problem is, when i play "armagedon MOD players" is 50/50 nemesis and survivor. This is good. But when i kill nemesis or survivor, death player respawn in to normal human or zombie i want respawn when i kill player, he is respawn back in to survivor or nemesis

And Snipers vs Assasin too

THX for help

SRY my bad english
Attached Files
File Type: sma Get Plugin or Get Source (zp50_gamemode_armageddon.sma - 646 views - 6.3 KB)
Korasnr is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 01-11-2014 , 01:46   Re: Armageddon mode respawn
Reply With Quote #2

Try..

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

#define PLUGIN   "Respawn on armageddon"  
#define AUTHOR        "who cares"  
#define VERSION         "1.0"  

#define TASK_AUTORESPAWN  100  
#define ID_AUTORESPAWN (taskid - TASK_AUTORESPAWN)  

const Float:AUTORESPAWN_DELAY 5.0  

new g_GameModeArmageddonID
     
new g_CvarDeathMatch 
new g_MaxPlayers  

public plugin_init() 
{  
    
register_plugin(PLUGINVERSIONAUTHOR)  
            
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
           
    
g_MaxPlayers get_maxplayers()  
}  

public 
plugin_cfg()  
{   
    
g_GameModeArmageddonID zp_gamemodes_get_id("Armageddon Mode")
    
g_CvarDeathMatch get_cvar_pointer("zp_deathmatch"
}  

public 
fw_PlayerKilled(victimattackershouldgib)
{  
    if (!
get_pcvar_num(g_CvarDeathMatch))  
        return;  
              
    if(
zp_gamemodes_get_current() == g_GameModeArmageddonID
    { 
            
set_task(AUTORESPAWN_DELAY"auto_respawn_player"victim+TASK_AUTORESPAWN)          
    }           
     
}  

public 
auto_respawn_player(taskid)  
{  
    if(
is_user_alive(ID_AUTORESPAWN))
            return;  
                
    if(
get_pcvar_num(g_CvarDeathMatch) == || (get_pcvar_num(g_CvarDeathMatch) == && random_num(01)) || (get_pcvar_num(g_CvarDeathMatch) == && zp_core_get_zombie_count() < fnGetAlive()/2))  
    {  
        
zp_class_nemesis_set(ID_AUTORESPAWN)  
    }   
     
    else  
    
    {  
        
zp_class_survivor_set(ID_AUTORESPAWN)  
    }  
     
    
ExecuteHamB(Ham_CS_RoundRespawnID_AUTORESPAWN)  
}  

fnGetAlive() 
{  
    new 
iAliveid  
      
    
for (id 1id <= g_MaxPlayersid++) 
    {  
        if (
is_user_alive(id))  
            
iAlive++  
    }  
    return 
iAlive;  

edited..

Last edited by wicho; 01-11-2014 at 04:12.
wicho is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
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
Korasnr
Junior Member
Join Date: May 2011
Location: Slovakia
Old 01-11-2014 , 06:54   Re: Armageddon mode respawn
Reply With Quote #4

Not working
Korasnr is offline
xxwantedxx
BANNED
Join Date: Dec 2013
Location: Georgia
Old 01-11-2014 , 08:32   Re: Armageddon mode respawn
Reply With Quote #5

u can change it in zombieplague.cfg
xxwantedxx is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 01-11-2014 , 09:55   Re: Armageddon mode respawn
Reply With Quote #6

Did u check the console for any errors or stuff ? did it give u any compile errors ? Are there any other side effects like instead of 1 guy every1 respawns as nemesis .....

And the MOST IMPORTANT THING, set the value of RESP_DELAY in the code less than the respawn time u have set in zombieplague.cfg
__________________
You will find everything u need :-
Catastrophe is offline
Korasnr
Junior Member
Join Date: May 2011
Location: Slovakia
Old 01-11-2014 , 11:45   Re: Armageddon mode respawn
Reply With Quote #7

Quote:
Originally Posted by Catastrophe View Post
Did u check the console for any errors or stuff ? did it give u any compile errors ? Are there any other side effects like instead of 1 guy every1 respawns as nemesis .....

And the MOST IMPORTANT THING, set the value of RESP_DELAY in the code less than the respawn time u have set in zombieplague.cfg

Sma is good not problem. Problem is when i add plugin in plugins.ini and restart server and join in server, "Armagedon mod" miss in the admin menu, i cant use mod...

Last edited by Korasnr; 01-11-2014 at 11:57.
Korasnr is offline
xxwantedxx
BANNED
Join Date: Dec 2013
Location: Georgia
Old 01-11-2014 , 15:40   Re: Armageddon mode respawn
Reply With Quote #8

try custom game modes plugin, or download mine plugin and then edit delay, as i sad u must check zombieplague.cfg and set delay and find ljn mode and the. set delay again. it must work
xxwantedxx is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 01-12-2014 , 03:10   Re: Armageddon mode respawn
Reply With Quote #9

Dude .... dont just use the sma i gave u.... use the game mode... the one u gave and the script that i gave....
Cant believe how inexperienced people can server owners be (No offense)

That mean use thisp and also use this
__________________
You will find everything u need :-
Catastrophe is offline
Reply


Thread Tools
Display Modes

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 04:40.


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