GivePlayerMoney is called when player spawning
#1

Heey all,

Anyone noticed when you spawning you getting 100 dollar.
Does anyone knows in how to remove this?
I already searched my script for GivePlayerMoney but didnt find it.
I need this for my anti money hack cause i am using server side money and when players
spawning they getting kicked by this.

Thanks Admigo

EDIT:
pawn Код:
if(GetPlayerServerMoney(i) != GetPlayerMoney(i))
        {
            ResetPlayerServerMoney(i);//Resets the money in the original moneybar, Do not remove!
            GivePlayerMoney(i,GetPlayerServerMoney(i));//Sets the money in the moneybar to the serverside cash, Do not remove!
            new hack = GetPlayerMoney(i) - GetPlayerServerMoney(i);
            printf("%s has picked up/attempted to spawn $%d.", GetPlayeridName(i),hack);
            PlayerInfo[i][KickCount]++;
            Kick(i);
        }
Reply
#2

I 've noticed that I lose automatically 100$ when I spawn after death even if there is no such code line in playerspawn code.
Reply
#3

You Have Register/login System right?
See it carefully.

If theres no code like that, You might have Register dialog on OnDialogResponse.
Add a line in it :- SetPlayerMoney(playerid, 0); or ResetPlayerMoney(playerid);

Because whenever a hacker joins, he will see that his money is 0.
He will try to spawn money and then your Anti-Hack system can caught it.
Reply
#4

Is this a sa-mp/gta bug or is there a giveplayermoney in any include or plugin?
Reply
#5

Or you can just onplayerspawn giveplayermoney(playerid, -100) and on playerdeath giveplayermoney 100 or how much it is giving/removing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)