Raised This Month: $ Target: $400
 0% 

My money script's not workin', plz take a look.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deBUG
Junior Member
Join Date: Aug 2004
Old 09-05-2004 , 22:25   My money script's not workin', plz take a look.
Reply With Quote #1

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 }
deBUG is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 09-05-2004 , 23:11  
Reply With Quote #2

Here is a kinda changed version , but I think it's what you want , it gives everyone 16000 at the start of ever round. :
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> public plugin_init() {    register_plugin("Money Money","0.1","Leo [deBUG]")    register_cvar("amx_money","1")    register_event("ResetHUD","money","a") } public money(id) {    if(get_cvar_num("amx_money")==1)     {      cs_set_user_money(id,16000)      set_hudmessage( 255, 0, 0, -1.0, -1.0, 0, 6.0, 5.0, 0.5, 1.5, 4 )      show_hudmessage(0, "Money Money mode is enabled , everyone gets $16000 every round")         return PLUGIN_HANDLED     }         return PLUGIN_HANDLED }
Peli is offline
Send a message via MSN to Peli
deBUG
Junior Member
Join Date: Aug 2004
Old 09-06-2004 , 14:35  
Reply With Quote #3

i tried it just now, it doesn't work. can anyone help plz? thx
deBUG is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode