31.07.2013, 14:16
Quote:
Yes, Of course, It could be added like this.
Code:
if(listitem == 0) { GivePlayerWeapon(playerid, 25, 390); SendClientMessage(playerid, -1, "You Have Bought 390 package of Shotgun Ammo"); GivePlayerMoney(playerid, -1000); // 1000 is the price of weapon. You can change it. } |
It should be :
pawn Code:
if(listitem == 0)
{
if(GetPlayerMoney(playerid) > 1000)
{
GivePlayerMoney(playerid, -1000);
GivePlayerWeapon(playerid, 25,390);
SendClientMessage(playerid, -1, "You Have Bought 390 package of Shotgun Ammo");
}
else SendClientMessage(playerid, -1, "ERROR: You Don't Have Enought Money!");
}