23.02.2013, 06:15
(
Последний раз редактировалось Ananisiki; 15.12.2013 в 17:30.
)
^^^^^^^^
CMD:ad(playerid, params[])
{
if(GetPVarInt(playerid,"PillsTaken")>0)return SendClientMessage(playerid, COLOR_RED, "You can only use /ad once in a life time.");
new Float:health;
GetPlayerHealth(playerid,health);
SetPVarInt(playerid,"PillsTaken",1);
SetPVarInt(playerid,"PillsTaken",GetPVarInt(playerid,"PillTaken")+1);
if(isDead[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
if(health == 100) return SendClientMessage(playerid, COLOR_RED, "Your Health Is Already Full, You Cannot Take /ad.");
if(iCanUse[playerid]-gettime() > 0) return SendClientMessage(playerid, COLOR_RED, "Please Wait Before Taking Another Adrenaline Pill.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Have Taken An Adrenaline Pill.");
SetPlayerHealth(playerid, 100.0);
{
iCanUse[playerid] = gettime() + 5; // 5 seconds
}
return 1;
}
SetPVarInt(playerid,"PillsTaken",0);