Thread: [Solved] respawn plugin
View Single Post
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-13-2020 , 09:10   Re: respawn plugin
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN "Respawn"
#define VERSION "1.0"
#define AUTHOR "iceeedR"

new pRespawnEnabled

new const m_iMenu 205
new const CS_Menu_ChooseAppearance 3

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Killed"player""PostPlayerKilled"1)
    
pRespawnEnabled register_cvar("amx_respawn","1")
    
    
register_clcmd("joinclass","JoinClass")
    
register_clcmd("menuselect","JoinClass")
}

public 
PostPlayerKilled(iVictimiAttackershouldgib
{
    if(
get_pcvar_num(pRespawnEnabled)) {
        
set_task(2.0"RespawnVictim"iVictim)
    }
}

public 
RespawnVictim(id
{
    if(
get_pcvar_num(pRespawnEnabled) && !is_user_alive(id)) 
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid
    }
}

public 
JoinClass(id)
{
    if(
pev_valid(id) == && get_pdata_int(idm_iMenu) == CS_Menu_ChooseAppearance)
        
set_task(1.0"RespawnVictim"id)

__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 01-14-2020 at 08:54.
iceeedr is offline
Send a message via Skype™ to iceeedr