21.09.2010, 15:20
pawn Код:
new abletoeat[MAX_PLAYERS] = 1;
if(!strcmp("/eat", cmdtext,true))
{
if(abletoeat[playerid] == 0) return SendClientMessage(playerid, 0xFF9900AA,"You can't eat that fast again! try again later!");
if(!IsPlayerInRangeOfPoint(playerid, 2.0, 240.1804,1117.3380,1080.9922))return SendClientMessage(playerid, 0xFF9900AA,"You are not in /eat checkpoint.");
{
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0,1);
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid, health+20);
abletoeat[playerid] = 0;
SetTimerEx("eatagain","i",playerid,60*1000,false);
return 1;
}
pawn Код:
forward eatagain(playerid);
public eatagain(playerid)
{
abletoeat[playerid] = 1;
return 1;
}