23.06.2013, 04:07
Quando o player estiver com fome :]
pawn Code:
#define Callback::%0(%1) forward %0(%1); public %0(%1)
Callback::Eating(playerid, start){
static
Float: Vida
;
GetPlayerHealth(playerid, Vida);
if(Vida < 100){
if(!start){
ClearAnimations(playerid);
ApplyAnimation(playerid, "FOOD", "EAT_Burger",4.1,0,1,1,0,0);
Eating(playerid, 0);
GetPlayerHealth(playerid, Vida);
SetPlayerHealth(playerid, floatadd(Vida, 35));
SetTimerEx("Eating", 1500, false, "ii", playerid, 1);
return false;
}else{
GetPlayerHealth(playerid, Vida);
SetPlayerHealth(playerid, floatadd(Vida, 35));
}
}
return true;
}