Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Tamas on August 04, 2008, 03:31:52 AM

Title: Money Saving
Post by: Tamas on August 04, 2008, 03:31:52 AM
I has a money saving error if somebody quit or crash or etc... and not deposit his money he will lost all i tryed this code but its not work:

Quoteon *:SIGNAL:vcmp.event.part:{
  !writeini vcmp.money.ini MONEY $2 $vcmp.hgetmoney($1)

And how can i do that if i rejoin or somebody than the server read the correct players money from that file?
Title: Re: Money Saving
Post by: Tommis on August 04, 2008, 04:31:26 AM
Hey,

When working under the player part signal, remember always that you cannot use ID's. The player has left, if you try running a command to get the players name or information from the ID, it simply will not work because the player is not there anymore.

To get the player name, I would work with the signal to improve it, or sync player names to be saved to a var or smt before the player leaves.

Regards,
Tommis
Title: Re: Money Saving
Post by: Youpi! on August 08, 2008, 11:06:40 PM
O.o i think i gave you the way to fix that
But there is one more problem
somepeople when join gets a lot of money and i don't know how to fix that :( or even why the reason it happends
Title: Re: Money Saving
Post by: Tamas on August 08, 2008, 11:38:38 PM
Ok, whatever i solved the problem now.
When somebody quit, than the server check his money and write to a txt file, than if he rejoins his money will automatically reloaded from txt.

The money bug is not related to script, its the vc-mp bug, dunno maybe the developer team will fix this or something..