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: problem (
/showthread.php?tid=336013)
problem -
Face9000 - 20.04.2012
Hello,i've a condoms shop and i've this option in the shop (dialogs)
pawn Код:
if(listitem == 0) //10 condoms pack
{
if(GetPlayerMoney(playerid) >= 5000) {
GivePlayerMoney(playerid,-5000);
SendClientMessage(playerid, green,"Bought 10 condoms pack");
PlayerInfo[playerid][pCondoms] +10;
}
else return SendClientMessage(playerid, red, "You can't afford 5000$ to buy 10 condoms pack.");
}
A player bought 10 condoms pack and i need to increase the variable pCondoms by 10,but doesnt work.
Error "warning 215: expression has no effect" at
pawn Код:
PlayerInfo[playerid][pCondoms] +10;
- Thanks.
Re: problem -
ViniBorn - 20.04.2012
pawn Код:
PlayerInfo[playerid][pCondoms] += 10;
Re: problem -
Face9000 - 20.04.2012
Thanks.