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

Help biohazard


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krevele
Junior Member
Join Date: Mar 2021
Old 06-07-2023 , 23:37   Help biohazard
Reply With Quote #1

Im looking for a plugin for bio when a zombie dies he respawns instead of just dying and spectating

Last edited by Krevele; 06-08-2023 at 00:47.
Krevele is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 06-09-2023 , 11:18   Re: Help biohazard
Reply With Quote #2

Quote:
Originally Posted by Krevele View Post
Im looking for a plugin for bio when a zombie dies he respawns instead of just dying and spectating
PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < cstrike >
#include < fakemeta_util >
#include < biohazard >

new cvar_respawncvar_enf_seccvar_godmodecvar_godmode_timer

public plugin_init() 
{
       
register_plugin("[BIO] RESPAWN","1.0","LVNDR"
    
register_event("DeathMsg","olum","a"
    
register_event("ShowMenu","menusecim","b","4&Team_Select")
    
register_event("VGUIMenu","menusecim","b","1=2")
    
register_forward(FM_ClientKill"kill_komut")
    
RegisterHam(Ham_Spawn"player""Ham_Sspawn"1)
    
cvar_enf_sec register_cvar("bh_enfeksiyon_tipi""1")
    
cvar_respawn register_cvar("bh_respawn","1")
    
cvar_godmode register_cvar("bh_godmode""1")
    
cvar_godmode_timer register_cvar("bh_godmode_timer""3.0")
    return 
PLUGIN_CONTINUE 
}

public 
kill_komut()
{
    if(
get_pcvar_num(cvar_respawn))
        return 
FMRES_SUPERCEDE
    
return FMRES_IGNORED;
}

public 
olum() 
{    
    if(
get_pcvar_num(cvar_respawn))
    { 
        new 
id read_data(2
        new 
o_id[2]
        
o_id[0] = id
        set_task
(0.5,"respawn",0,o_id,2
    } 
    return 
PLUGIN_CONTINUE 


public 
menusecim(id)
{
    if(
get_pcvar_num(cvar_respawn))
    {
        new 
o_Id[2]
        
o_Id[0] = id
        set_task
(10.0,"respawn",0,o_Id,2)
    }
    return 
PLUGIN_CONTINUE
}

public 
respawn(o_id[]) 
{
    new 
id o_id[0]
    
    if (!
is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
if(cs_get_user_team(id) == CS_TEAM_UNASSIGNED || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
        return 
PLUGIN_HANDLED 
        
    
if (!is_user_alive(id))
    {
        
set_task(3.0,"Respawn_Player"id)
    }
    return 
PLUGIN_CONTINUE  

    


public 
Respawn_Player(id)
{
    if (!
is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
if(cs_get_user_team(id) == CS_TEAM_UNASSIGNED || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
        return 
PLUGIN_HANDLED 
        
    
if (!is_user_alive(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }
    return 
PLUGIN_CONTINUE  
    


public 
Ham_Sspawn(id)
{
    if(
game_started())
    {
        if(
is_user_connected(id))
            
set_task(0.5"enfeksiyon_tipi"id)
    }
}

public 
enfeksiyon_tipi(id)
{
    if(
is_user_connected(id))
    {
        switch(
get_pcvar_num(cvar_enf_sec))
        {
            case 
1insan(id)
            case 
2zombie(id)
            case 
3:
            {
                switch(
random_num(1,2))
                {
                    case 
1insan(id)
                    case 
2zombie(id)
                }
            }
        }
        
        if(
get_pcvar_num(cvar_godmode))
        {
            
fm_set_user_godmode(id1)
            
set_task(get_pcvar_float(cvar_godmode_timer), "stop_god"id)
        }
    }
}

public 
stop_god(id)
{
    
fm_set_user_godmode(id0)
}    

public 
zombie(id)
{
    if(
is_user_zombie(id))
    {
        
infect_user(id0)
        
cs_set_user_team(idCS_TEAM_T)
    }
}

public 
insan(id)
{
    if(!
is_user_zombie(id))
    {
        
cure_user(id)
        
cs_set_user_team(idCS_TEAM_CT)
    }
            
    
fm_give_item(id"weapon_m4a1")
    
fm_give_item(id"weapon_deagle")
    
fm_give_item(id"weapon_hegrenade")
    
fm_give_item(id"weapon_smokegrenade")
    
fm_give_item(id"weapon_flashbang")
    
cs_set_user_bpammo(idCSW_M4A1200)
    
cs_set_user_bpammo(idCSW_DEAGLE200)
    
cs_set_user_bpammo(idCSW_HEGRENADE1)
    
cs_set_user_bpammo(idCSW_SMOKEGRENADE1)
    
cs_set_user_bpammo(idCSW_FLASHBANG1)

HowToRuski is offline
addfom
New Member
Join Date: Jun 2023
Old 06-26-2023 , 04:10   Re: Help biohazard
Reply With Quote #3

Get FREE, instant access to student discount. Join us today, and start saving with big retailers like Levi's, ASOS, Express, Apple, Hollister https://hotstarapp.live/disney-plus-student-discount/
addfom is offline
mu88game0
New Member
Join Date: Jun 2023
Location: Hồ Chí Minh
Old 06-27-2023 , 04:46   Re: Help biohazard
Reply With Quote #4

mu88game0
mu88game0 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 03:51.


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