God
Posted: 2012 Mar 17 19:39
Sveiki, ar yra koks nors god mode adminui? (Na kad ji negaletu nusauti)
Code: Select all
#include <amxmodx>#include <fakemeta>#include <hamsandwich> #define PLUGIN "gjodmjowdazzz"#define VERSION "1.0"#define AUTHOR "The Ultimate TETYYS" new g_HasGodmode; public plugin_init(){ register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam(Ham_Spawn, "player", "Spawn", 1) register_clcmd("say /god", "God") register_clcmd("say /rgod", "removeGod")} public Spawn(id){ if(!is_user_alive(id)) return 1 g_HasGodmode = false; return 1} public God(id){ if(g_HasGodmode == 1 || get_user_flags != ADMIN_BAN){ return 1} fm_set_user_godmode(id, 1) return 1 } public removeGod(id){ if (get_user_flags == ADMIN_BAN){ fm_set_user_godmode(id, 0); g_HasGodmode = false; client_print(id, print_chat, "God mode removed.")}} stock fm_set_user_godmode(index, godmode = 0){ set_pev(index, pev_takedamage, godmode == 1 ? DAMAGE_NO : DAMAGE_AIM) g_HasGodmode = false; return 1}