This plugin gives godmode to everyone, i just want it to give godmode to CT's.
Can someone help me?
PHP Code:
#include <amxmodx>
#include <fun>
#define PLUGIN "asda"
#define VERSION "1.1"
#define AUTHOR "asdas"
new g_maxplayers
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /godmode", "clcmd_godall")
register_clcmd("say /tirargodmode", "clcmd_sacargodmode")
g_maxplayers = get_maxplayers()
}
public clcmd_godall(id) {
if(!(get_user_flags(id) & ADMIN_KICK)) {
client_print(id, print_chat, "[FRENZY] Nao tens acesso a este comando.")
return PLUGIN_HANDLED;
}
for(new i = 1; i <= g_maxplayers; i++) {
if(is_user_alive(i))
set_user_godmode(i, 1)
}
set_hudmessage( 255, 127, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "Godmode Ligado")
}
public clcmd_sacargodmode(id) {
if(!(get_user_flags(id) & ADMIN_KICK)) {
client_print(id, print_chat, "[FRENZY] Nao tens acesso a este comando.")
return PLUGIN_HANDLED;
}
for(new i = 1; i <= g_maxplayers; i++) {
if(is_user_alive(i))
set_user_godmode(i, 0)
}
set_hudmessage( 255, 127, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "Godmode Desligado")
}