PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /light","OpenTheLight")
}
public OpenTheLight(id) {
if(get_user_team(id) == 2) {
set_pev(id,pev_effects,EF_BRIGHTLIGHT)
client_print(id, print_chat,"[Light]: Light ON")
} else if(get_user_team(id) == 2) {
set_pev(id, pev_effects, pev(id, pev_effects) &~ EF_BRIGHTLIGHT)
client_print(id, print_chat,"[Light]: Light OFF")
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
i want to double command ON/OFF
ex:
CT player in the game write say /light open the light again write say /light shut the light.
sorry for my very bad english