SA-MP Forums Archive
GivePlayerMoney is called when player spawning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GivePlayerMoney is called when player spawning (/showthread.php?tid=434577)



GivePlayerMoney is called when player spawning - Admigo - 03.05.2013

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);
        }



AW: GivePlayerMoney is called when player spawning - HurtLocker - 03.05.2013

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


Re: GivePlayerMoney is called when player spawning - SimpalK - 03.05.2013

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.


Re: GivePlayerMoney is called when player spawning - Admigo - 03.05.2013

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


Re: GivePlayerMoney is called when player spawning - lean1337 - 03.05.2013

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