Help with Anti Avoid Death
#2

pawn Код:
//in the beginning
new bool:recentlydamaged[MAX_PLAYERS];

//Under OnPlayerTakeDamage:
recentlydamaged[playerid] = true;
SetTimerEx("RecentDTimer", 10000, 0, "d", playerid);

//the timer
forward RecentDTimer(playerid);
public RecentDTimrt(playerid) return recentlydamaged[playerid] = false;

//your cmd
CMD:heal(playerid,params[])
{
    if(recentlydamaged[playerid]) return SendClientMessage(playerid, -1, "ERROR: You have been recently damaged");
    GivePlayerMoney(playerid, -500);
    SetPlayerHealth(playerid, 100.0);
    return 1;
}
Reply


Messages In This Thread
Help with Anti Avoid Death - by GeekSiMo - 24.07.2014, 20:56
Re: Help with Anti Avoid Death - by Battlezone - 24.07.2014, 21:06
Re: Help with Anti Avoid Death - by Wizzy951 - 24.07.2014, 21:09
Re: Help with Anti Avoid Death - by Battlezone - 24.07.2014, 21:11
Re: Help with Anti Avoid Death - by GeekSiMo - 24.07.2014, 21:11
Re: Help with Anti Avoid Death - by Battlezone - 24.07.2014, 21:14
Re: Help with Anti Avoid Death - by GeekSiMo - 24.07.2014, 21:15

Forum Jump:


Users browsing this thread: 1 Guest(s)