02.11.2015, 17:21
Hey so i made this code for sprunk machine and it doesnt work as i want to
when i press f it takes money but doesnt heal player
and when i spam f it just takes money without waiting
hope any one can help me fix it thanks
when i press f it takes money but doesnt heal player
and when i spam f it just takes money without waiting
Код:
if(GetPlayerMoney(playerid) >= 1)
{
if(PRESSED(KEY_SECONDARY_ATTACK))
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 320.1455,1733.6205,997.6163))
{
new Float:HP;
if(HP >= 101)
SetPlayerHealth(playerid, HP+20);
GetPlayerHealth(playerid, HP);
GivePlayerMoney(playerid, -1);
ApplyAnimation(playerid,"VENDING","VEND_Use",1.4,0 ,1,1,0,2500,1);
}
}
}

