[HELP] AntiMoneyHack timer
#1

The point of this is, that if you tune your vehicle at PayNSpray, it will take your money and then sets the current money amount, to serversided money. In that way tuning will actually cost money. I hope you understand what i mean.

So here what i've done so far:

I have this under 1 second timer.
pawn Код:
if(GetPlayerCash(i) > GetPlayerMoney(i))
{
        PlayerInfo[i][pMoney] = GetPlayerMoney(i);
        ResetPlayerMoney(i);
        GivePlayerMoney(i, PlayerInfo[i][pMoney]);
        UpdateMoney(i);
}
else{   }
Is there something im doing wrong?


GetPlayerCash is this:

pawn Код:
stock GetPlayerCash(playerid)
{
    return PlayerInfo[playerid][pMoney];
}
Reply
#2

Quote:

PlayerInfo[i][pMoney] = GetPlayerMoney(i);

Well, you made a mistake, I guess.

I guess it's
PlayerInfo[i][pMoney] = GetPlayerCash(i);
Reply
#3

pawn Код:
if(Pinfo[playerid][money] > GetPLayerMoney(playerid)){
    //what ever u want to do
Reply
#4

Quote:
Originally Posted by the_chaoz
Посмотреть сообщение
pawn Код:
if(Pinfo[playerid][money] > GetPLayerMoney(playerid)){
    //what ever u want to do
That would be the same, with GetPlayerCash, if you see what my stock includes?

Well i tried that too just in case, but it still set's my Money and pMoney to 0$...

Quote:
Originally Posted by yanir3
Посмотреть сообщение
Well, you made a mistake, I guess.

I guess it's
PlayerInfo[i][pMoney] = GetPlayerCash(i);
This way it will get players pMoney, and sets it to pMoney, doesnt make sense... :S
Reply
#5

what does UpdateMoney(i) do? it seems you have everything done already.

Also you should check how much the money has gone down since if they cheat to make the money go really really low it'll wrap around and they'll have billions
Reply
#6

Quote:
Originally Posted by cessil
Посмотреть сообщение
what does UpdateMoney(i) do? it seems you have everything done already.

Also you should check how much the money has gone down since if they cheat to make the money go really really low it'll wrap around and they'll have billions
UpdateMoney just updates the textdraw for player...

I also have GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]); under OnPlayerSpawn, so the player have's the 'gamemoney'. But still i get 0$, even when i do ingame /money 0 1000 it gets reseted to 0$. Hmmm
Reply
#7

ah that could be lag then, if you set a variable to 1000 but it takes 1.5seconds to update on your client the script will see you have $0 client side and then reset the server variable to 0
Reply
#8

Quote:
Originally Posted by cessil
Посмотреть сообщение
ah that could be lag then, if you set a variable to 1000 but it takes 1.5seconds to update on your client the script will see you have $0 client side and then reset the server variable to 0
Ahh yeah i though so, so i should make the check starting in few second then.(?)

But thank you for your reply and for reminding of checking the billion money thing!
Reply
#9

did u ever change the player var integer? i mean did u set the amount of money that the player hve to that array?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)