Money anti-cheat problem. [REP+]
#1

Trying to make a money anticheat.

pawn Код:
public GetMoney()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new money = GetPlayerMoney(i);
            if(PlayerInfo[i][pCash] > money) // if the server money are more than the server given money
            {
                ResetPlayerMoney(i);
                GivePlayerMoney(i, PlayerInfo[i][pCash]);
            }
            else if(PlayerInfo[i][pCash] < money) // if the game money are lower than the server-given money
            {
                ResetPlayerMoney(i);
                GivePlayerMoney(i, PlayerInfo[i][pCash]);
            }
        }
    }
    return ;
}
But in-game the cash variable exists, but the money doesn't show in the hud.
Any ideas?
Reply
#2

Quote:
Originally Posted by GangsTa_
Посмотреть сообщение
But in-game the cash variable exists, but the money doesn't show in the hud.
Didn't make any sense for me, what are you trying to say?!
Reply
#3

Umm, well, to make you understand...
Actually let's say in a 24/7 I can buy whatever I want with the money from the [pCash] variable. But when I use /givemoney or whatever to increase the money - it just doesn't appear on the hud... Keeps being '0'
Reply
#4

Oh well, you could simply say that it's not giving you any money.
However, show the places where you are using the GetPlayerMoney function you created.
Also, did you forget to put a return size?
Quote:

return ;

pawn Код:
return 1;
Reply
#5

Fk I just forgot to add the timer for checking if a player hacks...
Damn, nevermind. Anyways thanks, rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)