Incase you don't know how to script and thus avalanche's response confused you, here is the full script:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
new bool:godmode[33]
public plugin_init()
{
register_plugin("Godmode Thingy","1.0","GHW_Chronic")
register_concmd("amx_pred","cmdforward",ADMIN_LEVEL_C,"<name> < 0=no more godmode 1=godmode this round 2=godmode forever >")
register_event("SendAudio","newround","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
}
public client_disconnect(id)
{
godmode[id]=false
}
public cmdforward(id,level,cid)
{
if(cmd_access(id,level,cid,3))
{
return PLUGIN_HANDLED
}
new arg1[32]
new arg2[8]
read_argv(1,arg1,31)
read_argv(2,arg2,7)
new target=cmd_target(id,arg1,3)
if(!target)
{
return PLUGIN_HANDLED
}
new name[32]
get_user_name(target,name,31)
if(str_to_num(arg2)==0)
{
console_print(id,"[AMXX] Took %s's godmode",name)
client_print(target,print_chat,"[AMXX] An admin has taken your godmode.")
godmode[id]=false
set_user_godmode(target,0)
}
else if(str_to_num(arg2)==1)
{
client_print(target,print_chat,"[AMXX] An admin has given you godmode for this round.")
console_print(id,"[AMXX] Gave %s godmode for this round",name)
godmode[id]=false
set_user_godmode(target,1)
}
else if(str_to_num(arg2)==2)
{
client_print(target,print_chat,"[AMXX] An admin has given you godmode that lasts forever.")
console_print(id,"[AMXX] Gave %s godmode forever",name)
godmode[id]=true
set_user_godmode(target,1)
}
else
{
console_print(id,"amx_pred <name> <0=no more godmode 1=godmode this round 2=godmode forever>")
}
return PLUGIN_HANDLED
}
public newround()
{
for(new i=1;i<=get_maxplayers();i++)
{
if(godmode[i])
{
set_user_godmode(i,1)
}
}
}