How to make? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make? (
/showthread.php?tid=108224)
How to make? -
Mr. Kid - 12.11.2009
Hello!
How to make a /deposit and /withdraw command?
Re: How to make? -
Calix - 12.11.2009
I would suggest searching the forums. There are hundreds of gamemodes out there that already have that implemented. Look for Roleplay gamemodes.
Also see:
http://forum.sa-mp.com/index.php?topic=2750.0
In direct reply to your question, make a variable that stores each player's money in the script, use this variable when you give or take money from a player. Make another variable that stores the money in their bank account. And adjust that variable accordingly when they use those commands. Finally, in your save/loading functions for the player, add these variables and you should be done. Though you may want to make a /balance command as well so they know how much is in their account.