hi i just started scripting (probably a couple hours ago) and i did some basic stuff and read some tuts and right now i just made a script which allows you to have max money everyround. the script compiled without errors or warnings and it says that its running when i say amxx plugins. the problem is, when i type the command "amx_mmoney 1" it says unknown command, however when i type amxx cmds, it shows my plugin and it shows beside it amx_mmoney so i dunno whats wrong. plz help moi.
Code:
/*********************************************************************
[AMXx] Money Money! 0.1 by Leo [deBUG]
Toggle having unlimited money every round.
amx_moneymoney 1/0 [1-Enable/0-Disable]
*********************************************************************/
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new moneymoney = 0
public plugin_init(){
register_plugin("Money Money","0.1","Leo [deBUG]")
register_concmd("amx_mmoney","cmd_moneymoney",ADMIN_LEVEL_A,"< 1 or 0 >")
register_event("Event_Money","moneymoney","a")
}
public cmd_moneymoney(id){
new arg[2]
read_argv(1,arg,1)
set_hudmessage(255, 0, 0, -1.0, 0.25, 0, 1.0, 5.0, 0.1, 0.2, 2)
if(equal(arg,"1")){
moneymoney = 1
console_print(id,"[AMXx] Unlimited money mode has been turned on.")
show_hudmessage(0,"[AMXx] Unlimited money mode has been turned on!!!")
} else if(equal(arg,"0")){
moneymoney = 0
console_print(id,"[AMXx] Unlimited money mode has been turned off.")
show_hudmessage(0,"[AMXx] Unlimited money mode has been turned off!!!")
} else {
if (moneymoney==0){
console_print(id,"Usage: amx_moneymoney 1=0n 0=Off Currently: OFF")
}
if (moneymoney==1){
console_print(id,"Usage: amx_moneymoney 1=0n 0=Off Currently: ON")
}
}
return PLUGIN_CONTINUE
}
public Event_Money(id){
if(moneymoney==0){
//nothing happens
}
if(moneymoney==1){
cs_set_user_money (id,16000,1)
}
return PLUGIN_CONTINUE
}