20.09.2012, 15:29
replace with ..
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerNearVendingMachine(playerid))
{
if(GetPlayerMoney(playerid)< 8) return SendClientMessage(playerid, -1, "You do not have enough money.");
new Float:h;
ApplyAnimation(playerid,"VENDING","VEND_Use",4.1,0,1,1,0,1,1);
GetPlayerHealth(playerid, h);
if(h < 80)
{
SetPlayerHealth(playerid, h+20);
}
else
{
SetPlayerHealth(playerid, 99);
}
GivePlayerMoney(playerid, -7);
}
}