buying a armor problem. - 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: buying a armor problem. (
/showthread.php?tid=292230)
buying a armor problem. -
KissOfDeath - 23.10.2011
sorry if i posted in a wrong section,
so here it is, it doesnt get the player money when they type /heal , here is the line
Код:
if (strcmp("/armor", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) <3000) return SendClientMessage(playerid, COLOR_RED, "You need more money to buy a armour !");
SetPlayerArmour(playerid, 100);
return 1;
}
it has no error, but it doesnt get the player money, how to fix?
Re: buying a armor problem. -
AeroBlast - 23.10.2011
pawn Код:
if (strcmp("/armor", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, COLOR_RED, "You need more money to buy a armour !");
else
{
SetPlayerArmour(playerid, 100);
GivePlayerMoney(playerid,-3000);
}
return 1;
}
Re: buying a armor problem. -
Kostas' - 23.10.2011
Isn't GetPlayerMoney
It's
pawn Код:
GivePlayerMoney(playerid,-2500);