God alınca buton engel
Gönderilme zamanı: Pzr Şub 03, 2019 2:03 pm
arkadaşlar god alınca buton engel lazım birde god alınca t silah alamasın lütfen yardımcı olurmsuunz
Kod: Tümünü seç
#include <amxmodx>
#include <engine>
#include <reapi>
public plugin_init() {
register_plugin("PLUGIN", "VERSION", "nd")
register_touch("weaponbox", "player", "fw_touch");
register_touch("armoury_entity", "player", "fw_touch");
register_touch("weapon_shield", "player", "fw_touch");
register_touch("func_button", "player", "fw_touch");
}
public fw_touch( ent, id ) {
if(godmode_sorgu() && get_user_team(id)==1) return PLUGIN_HANDLED;
return PLUGIN_CONTINUE;
}
bool:godmode_sorgu() {
new bir=0,iki=0,players[32],inum; get_players(players,inum,"aehi","CT"); //+c
for(new i=0; i<inum; i++) {
bir++;
if(!get_entvar(players[i], var_takedamage)) iki++;
}
return (bir > 0 && iki > 0) ? true:false;
}Bunu kopyalayım not defteri olarak mı kaydedeyimNecati Doğan yazdı: Pzr Şub 03, 2019 2:28 pm Dene.Kod: Tümünü seç
#include <amxmodx> #include <engine> #include <reapi> public plugin_init() { register_plugin("PLUGIN", "VERSION", "nd") register_touch("weaponbox", "player", "fw_touch"); register_touch("armoury_entity", "player", "fw_touch"); register_touch("weapon_shield", "player", "fw_touch"); register_touch("func_button", "player", "fw_touch"); } public fw_touch( ent, id ) { if(godmode_sorgu() && get_user_team(id)==1) return PLUGIN_HANDLED; return PLUGIN_CONTINUE; } bool:godmode_sorgu() { new bir=0,iki=0,players[32],inum; get_players(players,inum,"aehi","CT"); //+c for(new i=0; i<inum; i++) { bir++; if(!get_entvar(players[i], var_takedamage)) iki++; } return (bir > 0 && iki > 0) ? true:false; }