rofl, so about the on off command. anyone know why it aint working? (wow_enabled isnt even registered as a command)
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "World of Warcraft"
#define AUTHOR "Meta"
new bool:enabled
public plugin_init()
{
register_plugin(PLUGIN, "0.1", AUTHOR)
register_clcmd("wow_quests","quests",ADMIN_KICK,"Enable or Disable the quests")
register_clcmd("wow_items","items",ADMIN_KICK,"Enable or Disable the items")
register_clcmd("wow_bags","bags",ADMIN_KICK,"Enable or Disable the bags")
register_clcmd("wow_inventory","inventory",ADMIN_KICK,"Enable or Disable the inventory")
register_clcmd("wow_enable","enable",ADMIN_KICK,"Disable or Enable WoW");
}
public enable(id,level,cid)
{
if (!cmd_access(id,level,cid,1))
{
client_print(id,print_console,"[World Of Warcraft]: You have no access to this command")
return PLUGIN_HANDLED
}
new arg[11]
read_argv(1,arg,10)
if ( (equali(arg, "on", 2)) || (equal(arg, "1", 1)) )
{
enabled = true
client_print(0,print_chat,"[World Of Warcraft] is now Enabled")
client_print(0,print_console,"[World Of Warcraft] is now Enabled")
}
else
if ( (equali(arg, "off", 3)) || (equal(arg, "0", 4)) )
{
enabled = false
client_print(0,print_chat,"[World Of Warcraft] is now Disabled")
client_print(0,print_console,"[World Of Warcraft] is now Disabled")
}
return PLUGIN_HANDLED
}
public quests(id,level,cid)
{
if (!cmd_access(id,level,cid,1))
{
client_print(id,print_console,"[World Of Warcraft]: You have no access to this command")
return PLUGIN_HANDLED
}
if ( enabled == true )
{
new arg[11]
read_argv(1,arg,10)
if ( (equali(arg, "on", 2)) || (equal(arg,"1",1)) )
{
client_print(id,print_console,"[WoW Quests] are now enabled")
}
else
if ( (equali(arg, "off", 3)) || (equal(arg,"0",4)) )
{
client_print(id,print_console,"[WoW Quests] are now disabled")
}
}
return PLUGIN_HANDLED
}