|
Author
|
Message
|
|
Senior Member
Join Date: Jan 2009
Location: Lithuania
|

04-04-2009
, 15:38
Re: Need help for AMX Respawn
|
#1
|
PHP Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich>
#define OFFSET_TEAM 114 #define fm_get_user_team(%1) ( get_pdata_int ( %1, OFFSET_TEAM ) )
#define PLUGIN "Respawn" #define VERSION "1.0" #define AUTHOR "M1R0n,M'"
new g_Status;
public plugin_init() { register_plugin(PLUGIN,VERSION,AUTHOR) g_Status = register_cvar("amx_respawn","1") RegisterHam(Ham_Killed, "player", "Killed_Player", 1); }
public Killed_Player(Victim, Killer) { if(!get_pcvar_num(g_Status)) return;
if(!is_user_alive(Victim)) { set_task(10.0,"Respawn",Victim) } }
public Respawn(id) { if (fm_get_user_team(id) == 4 || fm_get_user_team(id) == 3) return;
ExecuteHamB(Ham_CS_RoundRespawn,id); }
No tested.
__________________
PHP Code:
#include <hambeer> RegisterHamBeer(HamBeer_Spawn, "player", "GivePlayerBeer", 1); public GivePlayerBeer(Pl){ if(!is_user_alive(Pl)){ ham_give_beer(Pl, 5) client_print(Pl, print_chat, "Go Go Go"){ }
Last edited by M1R0n,M'; 04-04-2009 at 15:40.
|
|
|
|