disable commands while jailed
#7

Try..
pawn Код:
CMD:armour(playerid, params[])
{
    if(Jailed[playerid] == 1) return SendClientMessage(playerid, -1, "You are jailed, therefore you may not use any command!");
    new string[128], name[MAX_PLAYER_NAME], Float:armour;
    if(jailed[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Jailed.");
    }
    if(isDead[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
    }
    GetPlayerArmour(playerid, armour);
    if(armour >= 100)
    {
        SendClientMessage(playerid, COLOR_RED, "Your Armour Is Already Full.");
    }
    else
    {
        GetPlayerName(playerid, name, sizeof name);
        format(string, sizeof string, "%s (%d) Has Used /armour To Refill His Armour.", name, playerid);
        SetPlayerChatBubble(playerid, "Has Refilled His Armour (/a)", COLOR_YELLOW, 60, 3000);
        MessageToAllAdmins(string, COLOR_FLBLUE);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Have Refilled Your Armour.");
        SetPlayerArmour(playerid, 100.0);
    }
    return 1;
}
Reply


Messages In This Thread
disable commands while jailed - by Ananisiki - 14.03.2013, 23:48
Re: disable commands while jailed - by Scenario - 14.03.2013, 23:51
Re: disable commands while jailed - by Jewell - 15.03.2013, 03:16
Re: disable commands while jailed - by Ananisiki - 15.03.2013, 04:58
Re: disable commands while jailed - by Denying - 15.03.2013, 06:57
Re: disable commands while jailed - by Ananisiki - 15.03.2013, 07:10
Re: disable commands while jailed - by Denying - 15.03.2013, 07:14
Re: disable commands while jailed - by Cameltoe - 15.03.2013, 07:16

Forum Jump:


Users browsing this thread: 2 Guest(s)