SA-MP Forums Archive
Server side money [Problem with reward] - 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: Server side money [Problem with reward] (/showthread.php?tid=591286)



Server side money [Problem with reward] - NexySamp - 10.10.2015

So i want to use this event system on my server https://sampforum.blast.hk/showthread.php?tid=297988 .But the problem is when you finish the event you get the 5k reward and then the server removes it,what should i do?How to fix this.Help

This is the way the player gets the money
PHP код:
GivePlayerMoney(playerid,5000); 



Re: Server side money [Problem with reward] - MartinSwag - 10.10.2015

Maybe something like this?

Код:
PlayerInfo[playerid][Money] += 5000;
UpdatePlayerMoney(playerid);
Код:
UpdatePlayerMoney(playerid)
{
	ResetPlayerMoney(playerid);
	GivePlayerMoney(playerid, PlayerInfo[playerid][Money]);
}



Re: Server side money [Problem with reward] - AbyssMorgan - 10.10.2015

PHP код:
//GameMode
forward GivePlayerMoneyEx(playerid,amount);

public 
GivePlayerMoneyEx(playerid,amount){
    
//server money function
    
    
return 1;
}


//Other Script
CallRemoteFunction("GivePlayerMoneyEx","dd",playerid,ammount);