23.06.2013, 18:28
like this?
already done that
Quote:
SetPlayerHealth(playerid, pHealth+10; } case 7: { if(GetPlayerMoney(playerid) <10) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); new FloatHealth; GetPlayerHealth(playerid, FloatHealth); SendClientMessage(playerid, -1, "You purchased a bottle of Coca-Cola for $10! ((+10 HP))"); GivePlayerMoney(playerid, -10); SetPlayerHealth(playerid, pHealth+10; } case 8: { if(GetPlayerMoney(playerid) <15) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); new FloatHealth; GetPlayerHealth(playerid, FloatHealth); SendClientMessage(playerid, -1, "You purchased a Cheese Burger for $15! ((+30 HP))"); ApplyAnimation(playerid,"VENDING", "vend_eat1_P",4.1,0,1,1,1,1,1); GivePlayerMoney(playerid, -15); SetPlayerHealth(playerid, pHealth+30; } case 9: { if(GetPlayerMoney(playerid) <40) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); SendClientMessage(playerid, -1, "You purchased a box of cigars for $40! ((/cigar))"); GivePlayerMoney(playerid, -40); (HasBoughtCigar[playerid] = 1); } case 11: { if(GetPlayerMoney(playerid) <20) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); SendClientMessage(playerid, -1, "You purchased a bottle of beer for $20!"); GivePlayerMoney(playerid, -20); (HasBoughtBeer[playerid] = 1); } } } return 1; } |