29.11.2008, 18:04
update:
there was a problem when your money changed more than 2 times (more than the maximum difference of 200) in less than 4 seconds (timer)
when i give myself -2000 in less than 4 seconds i get kicked;
this only happens for negative money
I think this is why it happens:
sometimes the timer checks the difference after
happened, and before
happened,
than there is still a difference... (i guess ><)
I solved it this way:
when a difference is detected between the var money of the inc, and the real money of the player he won't get kicked yet...
(because it's maybe that bug)
than a 2sec. timer is activated that will check again if there is still a difference
if there is, he'll get kicked
if there isn't, it means that the weird bug found place
hehe i don't really know how to explain this.... i tried it and i hope you understand what i mean
however here's the new download link:
http://pawn.pastebin.com/f756c7af3
http://pastebin.com/fb23a376
(also edited in the 1st post)
there was a problem when your money changed more than 2 times (more than the maximum difference of 200) in less than 4 seconds (timer)
when i give myself -2000 in less than 4 seconds i get kicked;
this only happens for negative money
I think this is why it happens:
sometimes the timer checks the difference after
Код:
dini_IntSet(file, "Money", F_Money += amount);
Код:
GivePlayerMoney(playerid, amount);
than there is still a difference... (i guess ><)
I solved it this way:
when a difference is detected between the var money of the inc, and the real money of the player he won't get kicked yet...
(because it's maybe that bug)
than a 2sec. timer is activated that will check again if there is still a difference
if there is, he'll get kicked
if there isn't, it means that the weird bug found place
hehe i don't really know how to explain this.... i tried it and i hope you understand what i mean
however here's the new download link:
http://pawn.pastebin.com/f756c7af3
http://pastebin.com/fb23a376
(also edited in the 1st post)