Keeping track of how much money a player has
I'm working on a plugin that remembers all of a users game info between connections to the server. I have the score portion complete but now I am working on money.
Right now I am using the below to keep a record of the players money so that when they go to disconnect I will have a record of it so I can save it to a file. Is there a better way to go about this? I put a console_print on the below just to see how often it is updated and every single cash transactions triggers it, which is good, but I was concerned about preserving CPU\efficiency. PHP Code:
|
Re: Keeping track of how much money a player has
Bump.
Or just knowing how much $ a player has when they disconnect would work as well. The above code works fine but I have another function that cashes in all weapons\equipment a payer is carrying and gives them money credit. This way when they reconnect they can sort of start from where they left off. It's probably puttng a hurtin' on CPU usage to call that at every money transaction and weapon-pickup/drop. I'm not knowledgeable at all with fakemeta or hamsandwich etc so I don't know if there is some other efficient way to just determine how much $\weapons a player has at disconnect. |
Re: Keeping track of how much money a player has
Code:
And if that doesn't work: Code:
Or, if you don't want to use fakemeta: Code:
|
Re: Keeping track of how much money a player has
Quote:
Thanks for the reply +karma |
| All times are GMT -4. The time now is 05:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.