help with this command please
#10

Код:
CMD:ad(playerid, params[])
{
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(GetPVarInt(playerid,"PillsTaken")> 0)return SendClientMessage(playerid, COLOR_RED, "You Can Only Use /ad Once In A Life Time.");
    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.");
    SetPVarInt(playerid,"PillsTaken",1);
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
    ApplyAnimation(playerid,"SMOKING","M_smk_in",4.2,0,0,0,0,0,1);
    busyAnim[playerid] = true;
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Have Taken An Adrenaline Pill, Your Health Has Been Refilled.");
    SetPlayerChatBubble(playerid, "Has Taken Adrenaline Pill", COLOR_YELLOW, 60, 3000);
    SetPlayerHealth(playerid, 100.0);
    return 1;
}

//Put this under OnPlayerSpawn
SetPVarInt(playerid,"PillsTaken",0);
OK so with this u can take it once "in a life-time" and thats it

Is that what u wanted?
Reply


Messages In This Thread
help with this command please - by Ananisiki - 14.03.2013, 04:31
Re: help with this command please - by Glad2BeHere - 14.03.2013, 04:37
Re: help with this command please - by Ananisiki - 14.03.2013, 04:41
Re: help with this command please - by Glad2BeHere - 14.03.2013, 04:44
Re: help with this command please - by Ananisiki - 14.03.2013, 04:45
Re: help with this command please - by Ananisiki - 14.03.2013, 21:22
Re: help with this command please - by Patrick - 14.03.2013, 21:30
Re: help with this command please - by Ananisiki - 14.03.2013, 22:53
Re: help with this command please - by Patrick - 14.03.2013, 23:01
Re: help with this command please - by Tika Spic - 14.03.2013, 23:33

Forum Jump:


Users browsing this thread: 1 Guest(s)