This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Please please help urgent !!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KiNg Clan
Junior Member
Join Date: Feb 2011
Old 02-11-2016 , 09:45   Please please help urgent !!!
Reply With Quote #1

I have my cs 1.6 server biohazard mode
I added the respawn plug zombie dies reborn
but this is not the proper way zombie types wonder why ???


I use the plugin:
Code:
#include <amxmodx>
#include <biohazard>
#include <hamsandwich>

#define TASK_RESPAWN 123543

new cvar_respawn, cvar_timerespawn

public plugin_init()
{
    register_plugin("[Bio] Addon: Zombie Spawn", "1.0", "Dias")
    register_event("DeathMsg", "event_death", "a")
    register_event("HLTV", "event_newround", "a", "1=0", "2=0")
    
    cvar_respawn = register_cvar("bh_zombie_respawn", "1")
    cvar_timerespawn = register_cvar("bh_time_respawn", "10.0")
}

public event_death()
{
    new victim = read_data(2)
    
    if(is_user_zombie(victim) && get_pcvar_num(cvar_respawn))
    {
        set_task(get_pcvar_float(cvar_timerespawn), "do_respawn", victim+TASK_RESPAWN)
        
        message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("BarTime"), _, victim)
        write_short(get_pcvar_num(cvar_timerespawn))
        message_end()
        
        client_print(victim, print_center, "You will be respawned after: %i seconds", get_pcvar_num(cvar_timerespawn))
    }
}

public event_newround(id)
{
    if(task_exists(id+TASK_RESPAWN)) 
    {
        remove_task(id+TASK_RESPAWN)
        
        message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("BarTime"), _, id)
        write_short(0)
        message_end()
    }
}

public do_respawn(taskid)
{
    static id
    id = taskid - TASK_RESPAWN
    
    if(is_user_zombie(id))
    {
        ExecuteHam(Ham_CS_RoundRespawn, id)
        client_print(id, print_center, "You have been respawned")
    }
}

pictures:
Attached Images
File Type: jpg de_rusya0001.jpg (23.7 KB, 241 views)
KiNg Clan 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 01:03.


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