I need edit this plugin. When killed respawn get zombie all players (Sorry my english too bad.)
I want compatible with ZP 4.3 or 5.0
Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#pragma semicolon 1
#define VERSION "1.0"
new cvar_on, cvar_time;
new Float: Origin[33][3];
public plugin_init()
{
register_plugin("Respawn at place", VERSION, "Drekes");
cvar_on = register_cvar("amx_respawn_on", "1");
cvar_time = register_cvar("amx_respawn_time", "5.0");
RegisterHam(Ham_Killed, "player", "Fwd_Ham_Killed_Pre", 0);
}
public Fwd_Ham_Killed_Pre(victim, attacker, shouldgib)
{
if(get_pcvar_num(cvar_on))
{
if(is_user_connected(victim))
{
entity_get_vector(victim, EV_VEC_origin, Origin[victim]);
Origin[victim][2] += 20.0;
}
set_task(get_pcvar_float(cvar_time), "Respawn", victim);
}
}
public Respawn(id)
{
if(is_user_connected(id))
{
ExecuteHamB(Ham_CS_RoundRespawn, id);
entity_set_origin(id, Origin[id]);
}
}