GivePlayerMoney - Question - 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 - Question (
/showthread.php?tid=437682)
GivePlayerMoney - Question -
NL-Sultan - 16.05.2013
Hello everyone,
I've made a small trash-cleaner job, the purpose of the job is that you're cleaning trash by going through checkpoints. When you reach the final checkpoint you should have +$50.
But the thing is, when you reach the final checkpoint in reality, you get +$50 and one second later the $50 will go off again.
The code I've used for the final checkpoint:
pawn Код:
if(trashjob[playerid] == 23)
{
DisablePlayerCheckpoint(playerid);
trashjob[playerid] = 0;
GivePlayerMoney(playerid, 50);
SendClientMessage(playerid, COLOR_GREY, "You're done with your mission. You have earned $50!");
}
return 1;
}
Does anyone know how I could fix this?
Re: GivePlayerMoney - Question -
Rillo - 16.05.2013
Do you have any anti-money hack?
Re: GivePlayerMoney - Question -
DaRk_RaiN - 16.05.2013
Does your server have a sided money system? if so then no wonder.
Usually it's SafeGivePlayerMoney or w/e, search in the previous checkpoints for the function that gave the player money and re-use it in the above code.
Re : GivePlayerMoney - Question -
MCZOFT - 16.05.2013
Go to your Gamemod
and search for this lines
PHP код:
if(GetPlayerMoney(playerid) != PlayerInfo[playerid][pMoney])
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
}
and delete the ResetPlayerMoney(playerid);
make it like that
PHP код:
if(GetPlayerMoney(playerid) != PlayerInfo[playerid][pMoney])
{
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
}
if you dident find thoes lines ?
then just search on your server for ResetPlayerMoney(playerid);
and delete it
and it will solove ,
Re: GivePlayerMoney - Question -
NL-Sultan - 16.05.2013
It is server side, anyone knows how to give it on a alternative way?
- Temporarily added the server side money in a commentary, so it works.
FIXED:It's GivePlayerCash instead of GivePlayerMoney. Thanks for answers though!