/Shop issues - 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: /Shop issues (
/showthread.php?tid=447855)
/Shop issues -
Jay_Dixon - 01.07.2013
Ok, so i have it set up, to where if you don't have a certain amount of money, the sale shouldn't go threw, but it does. What am i doing wrong here?
Код:
case 0:
{
if(AC_GetPlayerMoney(playerid < 2000))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You do not have enough money!");
return 1;
}
else
{
SetPlayerArmour(playerid, 100);
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased Armor!");
}
return 1;
}
Re: /Shop issues -
arakuta - 01.07.2013
pawn Код:
if(AC_GetPlayerMoney(playerid) < 2000)
Re: /Shop issues -
DobbysGamertag - 01.07.2013
id do it like this:
pawn Код:
case 0:
{
if(AC_GetPlayerMoney(playerid < 2000))return SendClientMessage(playerid,COLOR_LIGHTBLUE,"You do not have enough money");
else
{
SetPlayerArmour(playerid, 100);
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased Armor!");
}
return 1;
}
Not on my PC so i cant check

Sorry if it fails.