This is probably the billionth time this has been written, but i gave a spit shine, and wrote it up again with a few tweaks. Even though this is probably one small part of some huge package full of admin commands, i wrote this script for beginners like me, and commented the complicated sections. This script contains no copied code, i wrote it all myself, and only wrote what i understand, thats why there is some minimal error catching. However, this script compiles with out any errors or warnings.
A user can type /givemoney or /takemoney in the normal chat to give or take money to themselfs. However, an admin can do it though console, and make sure everyone knows it.
This script is basicaly for jacking around, and so basicaly you can kill the hosties and still be able to buy an AWP every round.
Code:
/*
Money Refill Script
Player just has to type amx_givemoney and the script should change their total to $16000
Script by Duo/[LLJK]Addict
COMMANDS:
amx_moneyrefill Toggles the script on and off
amx_givemoney (User) <Gives the person $16000>
amx_takemoney (User) <Strips user to $0>
/givemoney <Console Use of Givemoney to Self Only>
/takemoney <Console Use of Takemoney to Self Only>
Vesron 1.01
Indentation makes it alot more readable
Changed the user var to stop conflicting with other varibles
32 array wrong, 31 array right
Verson 1.00
Now running on no one elses code, only mine
The new commands /givemoney and /takemoney work, but for the person typing them, no announce
Took everything out of console, and echoed into the user chat, and make the csay when the script is turned on or off
Compleatly bug and error free
Verson .5
Added an enable and disable option
No more errors
Verson 0.1
First verson, a few warnings but nothing that really effects the script
*/
Stuff i might add if wanted
*the ability to disable or enable the admin usage announce
*Cvars instead of if then if i can figure em out
* The ability to request an amount of money, and not just all or none