GivePlayerMoney - Question
#1

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?
Reply
#2

Do you have any anti-money hack?
Reply
#3

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.
Reply
#4

Go to your Gamemod
and search for this lines

PHP код:
        if(GetPlayerMoney(playerid) != PlayerInfo[playerid][pMoney])
        {
               
ResetPlayerMoney(playerid);
            
GivePlayerMoney(playeridPlayerInfo[playerid][pMoney]);
        } 
and delete the ResetPlayerMoney(playerid);

make it like that
PHP код:
        if(GetPlayerMoney(playerid) != PlayerInfo[playerid][pMoney])
        {
               
GivePlayerMoney(playeridPlayerInfo[playerid][pMoney]);
        } 
if you dident find thoes lines ?
then just search on your server for ResetPlayerMoney(playerid);

and delete it

and it will solove ,
Reply
#5

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)