07.12.2017, 09:12
I was editing my house system (fs) so it will be compatible with serverside money function in my GM. I use CallRemoteFunction to call the function of the serverside money in my GM to my house system filterscript, it seems to work but one problem is when I try to buy a house, it gave me unlimited money, not taken any money from me. The store cash / withdraw cash in my house system works with CallRemoteFunction ...
Serverside money function :
CallRemoteFunction under /buyhouse :
But it works when I use CallRemoteFunction("GivePlayerCash", "dd", playerid, blablabla) on another cmd like store cash or withdraw cash ..
Serverside money function :
PHP код:
forward GivePlayerCash(playerid, money);
public GivePlayerCash(playerid, money)
{
Account[playerid][Money] += money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, Account[playerid][Money]);
return Account[playerid][Money];
}
PHP код:
CallRemoteFunction("GivePlayerCash", "dd", playerid, -hInfo[i][hPrice]);
format(string, 128, "You have bought this house for $%d.", hInfo[i][hPrice]);
SendClientMessage(playerid, COLOR_YELLOW, string);