Raised This Month: $51 Target: $400
 12% 

Suggestion / Subplugin Request Respawn Info for Zombies.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rybka
Member
Join Date: Dec 2011
Old 03-04-2012 , 05:09   Respawn Info for Zombies.
Reply With Quote #1

I write topic once again, well This plugin tell us, " Iff humans killing someone zombies it plugin countdown Task how many seconds to again respawn "
For example - in my zombieplague cfg i have " zp_spawn_delay 30 " Iff zombies dead it in hud display task than 30 second you will be respawned and reaches to 0 second, and zombies respawned =) Its just information how many they must wait to respawn ...

Code:
#include <amxmodx>
#include <amxmisc>
#include <zombieplague> 

#define PLUGIN "Respawn Info"
#define VERSION "0.1"
#define AUTHOR "StefaN"

new countdown[33]

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "surv", "a")
}

public surv(){
        new zombiedead=read_data(2)
        if(zp_get_user_zombie(zombiedead)) set_task(0.5, "turncountdown", zombiedead)
}

public turncountdown(id)
{
        countdown[id] = 30    // Time to respawn
        
        if(task_exists(id + 3431))
        {
                remove_task(id + 3431)
        }
        set_task(1.0, "stop", id + 3431, _, _, "b")
        
        return PLUGIN_CONTINUE
}

public stop(gamemode, task_id)
{
        new id = task_id - 3431
        
        set_hudmessage(255, 255, 255, 0.03, 0.76, 2, 0.02, 1.0, 0.01)
        show_hudmessage(id, "Respawned for %d second...", countdown[id])
        countdown[id] -= 1 
        
        if(countdown[id] <= 0)
        {
                if(task_exists(task_id))
                {
                        remove_task(task_id)
                }
        }
}
But i have a one problem, doesn't know how to block that information display on Survivor mode and others too ...

In Line changes:
Code:
if(zp_get_user_zombie(zombiedead)) set_task(0.5, "turncountdown", zombiedead)
For
Code:
if((zp_get_user_zombie(zombiedead)) && (gamemode != MODE_SURVIVOR))  set_task(0.5, "turncountdown", zombiedead)
But that did not help to blocked info...

I would ask for help, and sorry for the previous topic ...

Last edited by rybka; 03-04-2012 at 05:22.
rybka is offline
rybka
Member
Join Date: Dec 2011
Old 03-13-2012 , 13:03   Re: Respawn Info for Zombies.
Reply With Quote #2

Well ill be wait ... Didn't know someone to fix it !?
Guys comone help me with that plugin =(

[IMG]http://img190.**************/img190/7601/respawnplug.png[/IMG]

You will be respawn from ash for % second

I have got on respawn 30 second but needed this display ...

Last edited by rybka; 03-13-2012 at 13:04.
rybka 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 15:33.


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