Having a problem with GetPlayerMoney ?
#1

Hello,

Since 0.3a i think have a weird problem with GetPlayerMoney or its a new kind of cheat they have but i dont think so.
I also dont know if its a 0.3a bug but i asked on irc and no one could confirm that bug so i try my luck here.

So its about a /rob command i used for a long time now but since we have moved to 0.3a something weird happen.

So Player A robbed Player B and here is the part of the code.

Код:
  new pcash1 = random(GetPlayerMoney(giveplayerid)); // Getting a random amount money from Player B his money
	  GivePlayerPCash(playerid,pcash1); //PCash is i use to check players for money cheating
  GivePlayerMoney(playerid,pcash1);// Player A money he robbed from Player B
  GivePlayerPCash(giveplayerid, -pcash1); //PCash is i use to check players for money cheating
  GivePlayerMoney(giveplayerid, -pcash1);//Here it takes that random money amount from Player B
There is also some codes that players cant have more then 1.5 million/4 million so its impossible to have more that 4 million


Now the problem is That Player A robbed like $99999999 from Player B that only had $500.000

[01:00:21] Player A(29) Has robbed $1498104409 from Player B(19)
[01:00:22] **(CASH INCREASE)** Player B(19) money has increased from $-1498055255 to $-1497936093 (119162) (0)
[01:00:22] **(CASH INCREASE)** Player A(29) money has increased from $694 to $999999999 (999999305) (0)
[01:00:22] **(AUTO BAN)** Player A(29) :[$999999305] Int:[0]
/////////This is copy and paste from the logs and changed the player names to Player A/Player B\\\\\\\\\\

There is no way that Player B had that money cause the logs showed he had 500k and he would have been auto-banned

i have posted this in 0.3 scripting section cause i used this /rob for a while and never seen this before and since 0.3a it happend to me 3 times now.

Im not up2date with any new cheat or something but i hope this is a scripting issue that can get solved




Greetz,

wijnkamp






Reply
#2

There's no logic in your code

pawn Код:
new pcash1 = random(GetPlayerMoney(giveplayerid));
// and then
GivePlayerMoney(giveplayerid,-pcash1);
btw I don't know how to help you
Reply
#3

How is that no logic.. ?

It takes the random amount from the player that got robbed


thnx for your reply i gues :S
Reply
#4

Quote:
Originally Posted by wijnkamp
How is that no logic.. ?

It takes the random amount from the player that got robbed


thnx for your reply i gues :S
Because you give player random money, and then you take random money from player.
Reply
#5

Quote:
Originally Posted by Luka™
Quote:
Originally Posted by wijnkamp
How is that no logic.. ?

It takes the random amount from the player that got robbed


thnx for your reply i gues :S
Because you give player random money, and then you take random money from player.
It's logical thing, isn't it? He stored a random money of 'giveplayerid' and gave it to the playerid who robbed him. It's an /rob command.
Reply
#6

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Luka™
Quote:
Originally Posted by wijnkamp
How is that no logic.. ?

It takes the random amount from the player that got robbed


thnx for your reply i gues :S
Because you give player random money, and then you take random money from player.
It's logical thing, isn't it? He stored a random money of 'giveplayerid' and gave it to the playerid who robbed him. It's an /rob command.
Yeah, I didn't see that GetPlayerMoney
I think that he's gave player money with

new pcash1 = random(GivePlayerMoney(giveplayerid)); // I didn't see that is GetPlayerMoney
Reply
#7

Subject: Re: Having a problem with GetPlayerMoney ?

Anyway i still have no solution for this how ever it didnt happend again so i just wait and hope it wont happen.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)