GivePlayerMoney or GivePlayerCash Bug. - 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 or GivePlayerCash Bug. (
/showthread.php?tid=387748)
GivePlayerMoney or GivePlayerCash Bug. -
RenovanZ - 26.10.2012
Removed
Re: GivePlayerMoney or GivePlayerCash Bug. -
dr.lozer - 26.10.2012
can you show the Code ??
Re: GivePlayerMoney or GivePlayerCash Bug. -
RenovanZ - 26.10.2012
Removed
Re: GivePlayerMoney or GivePlayerCash Bug. -
Lordzy - 26.10.2012
It can happen if you're using server side money functions.
For example,
pawn Код:
new Srvrsidecash[MAX_PLAYERS];
stock GivePlayerCash(playerid, amount)
{
return Srvrsidecash[playerid] +amount;
}
CMD:healme(playerid,params[])
{
if(Srvrsidecash[playerid] <100) return SendClientMessage(playerid, -1, "You don't have enough cash to use this command.");
//Using server side cash system.
SetPlayerHealth(playerid, 100.00);
return 1;
}
Such kinda problems are happening to some users.
It's because they give cash using other function(normal or server sided) and detect using another.
Check whether it's like that or not.
Re: GivePlayerMoney or GivePlayerCash Bug. -
RenovanZ - 26.10.2012
Removed
Re: GivePlayerMoney or GivePlayerCash Bug. -
jessejanssen - 26.10.2012
Quote:
Originally Posted by Kiyozi_Mu
My server GivePlayerCash stock is:
Код:
stock GivePlayerCash(playerid, money)
{
SetPVarInt(playerid, "Cash", GetPVarInt(playerid, "Cash")+money);
GivePlayerMoney(playerid, money);
return 1;
}
And, what function that must i use ?
GivePlayerMoney/SetPVarInt/GivePlayerCash ?
|
You should replace ALL "GivePlayerMoney"s with "GivePlayerCash" except the "GivePlayerMoney" in the "GivePlayerCash" function, else it will not work!
Jesse