Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
#include <engine>
#include <fun>
#define SERVERISMI "HYPNOSE CLAN"
new bool:gorunmez[MAX_CLIENTS+1];
public plugin_init() {
register_plugin("PLUGIN", "VERSION", "nd");
RegisterHookChain(RG_CBasePlayer_Spawn, "oyuncuspawnoldu",1);
RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed", 1);
RegisterHookChain(RG_CBasePlayer_PreThink, "think");
register_event("HLTV", "elbasi", "a", "1=0", "2=0");
register_touch("weaponbox", "player", "fw_touch"),register_touch("armoury_entity", "player", "fw_touch"),register_touch("weapon_shield", "player", "fw_touch");
}
public devam(id) {
new ndmenu[64];
formatex(ndmenu, charsmax(ndmenu),"\w%s AILESI \d|| \yGezinme Modu",SERVERISMI);
new Menu = menu_create(ndmenu, "devam2");
menu_additem(Menu, "\yEvet \r( \wNoclip \yIcin \wE \yTusuna Bas \r)", "1");
menu_additem(Menu, "\yHayir", "2");
menu_setprop(Menu, MPROP_EXITNAME, "\yCikis");
menu_display(id, Menu, 0);
}
public devam2(id, menu, item) {
if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; }
new access,callback,data[6],iname[32];
menu_item_getinfo(menu,item,access,data,charsmax(data),iname,charsmax(iname),callback);
new key=str_to_num(data);
switch(key) {
case 1: {
rg_set_user_team(id, TEAM_SPECTATOR);
rg_round_respawn(id);
gorunmez[id]=true;
rg_remove_all_items(id);
rg_gorunmez(id);
rg_set_user_footsteps(id, true);
set_user_godmode(id, 1);
set_entvar(id, var_maxspeed, 600.0);
}
case 2: gorunmez[id]=false;
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
///****///
public elbasi() {
new players[MAX_PLAYERS],num,id; get_players(players, num, "aehi", "SPECTATOR");
for(new i=0; i<num; i++) { id=players[i]; if(gorunmez[id]) ortak(id); }
}
public oyuncuspawnoldu(id) if(gorunmez[id]) ortak(id)
public ortak(id) {
if(get_member(id, m_iTeam)==TEAM_SPECTATOR) rg_set_user_team(id, TEAM_TERRORIST);
rg_round_respawn(id);
set_user_godmode(id, 0);
rg_gorunmez(id, true);
rg_set_user_footsteps(id, false);
gorunmez[id]=false;
set_entvar(id, var_maxspeed, 250.0);
set_entvar(id, var_movetype, MOVETYPE_WALK);
}
public fw_touch(ent, id) {
if(gorunmez[id]) return PLUGIN_HANDLED;
return PLUGIN_CONTINUE;
}
public think(id) {
if(!is_user_connected(id) || !gorunmez[id]) return PLUGIN_CONTINUE;
static buton,buton2;
buton=get_entvar(id, var_button); buton2=get_entvar(id,var_oldbuttons);
if(buton & IN_USE) set_entvar(id, var_movetype, MOVETYPE_NOCLIP);
else if(buton2 & IN_USE) set_entvar(id, var_movetype, MOVETYPE_WALK);
return PLUGIN_CONTINUE;
}
public CBasePlayer_Killed(olen, saldiran) {
new players[MAX_PLAYERS],num,id; get_players(players, num, "achi");
if(num==1) {
for(new i=0; i<num; i++) {
id=players[i];
if(gorunmez[id]) ortak(id),user_kill(id);
}
}
else if(get_user_team(olen)==1) devam(olen);
}
rg_gorunmez(id, bool:deger=false) set_entvar(id, var_effects, deger==true ? get_entvar(id, var_effects) & ~EF_NODRAW : get_entvar(id, var_effects) | EF_NODRAW);