Save an ammount & load it
#2

I'm glad to see someone who actually wants to learn and just doesn't expect hand-outs!

1. You don't need to save the money as a float unless you have a custom money system as they will always be integers (floats are variables btw - not sure if you knew that from your post)

2. How to do it depends on whether you want it to last between connections/server restarts or just temporarily. If temporarily, save the value inside a player array. Otherwise, write the value to a certain file with some type of person identification (like the player's name) while using /kidnap, and reading that number while using /paykidnap.

For writing/reading files, look on the wiki for the functions inside of file.inc .
Reply


Messages In This Thread
Save an ammount & load it - by mailu - 28.02.2013, 23:14
Re: Save an ammount & load it - by Bakr - 01.03.2013, 02:13

Forum Jump:


Users browsing this thread: 1 Guest(s)