set time for cmd
#4

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;
}
have fun
Reply


Messages In This Thread
set time for cmd - by nejc001 - 20.09.2010, 18:28
Re: set time for cmd - by Voldemort - 20.09.2010, 18:33
Re: set time for cmd - by nejc001 - 21.09.2010, 15:09
Re: set time for cmd - by Seven. - 21.09.2010, 15:20
Re: set time for cmd - by Luka P. - 21.09.2010, 15:24
Re: set time for cmd - by nejc001 - 21.09.2010, 15:33
Re: set time for cmd - by LarzI - 21.09.2010, 15:44
Re: set time for cmd - by Luka P. - 21.09.2010, 15:55
Re: set time for cmd - by nejc001 - 21.09.2010, 16:10
Re: set time for cmd - by Luka P. - 21.09.2010, 16:19

Forum Jump:


Users browsing this thread: 1 Guest(s)