Restrict commands
#1

^^^^^^^^
Reply
#2

^^^^^^^^
Reply
#3

Make a boolean which is disabled by default. Set the boolean to true on /restrictrape and make it so it checks if the boolean is true and then return that the command is restricted.

pawn Код:
new bool:RestrictRape;

CMD:restrictrape(playerid, params[])
{
    if(admin)
    {
        if(RestrictRape)
        {
            RestrictRape = false;
            SendClientMessageToAll(-1, "Rape has been un-restricted by an admin.");
        }
        else
        {
            RestrictRape = true;
            SendClientMessageToAll(-1, "Rape has been restricted by an admin.");
        }
    }
}

CMD:rape(playerid, params[])
{
    if(RestrictRape) return SendClientMessageToAll(-1, "Rape is restricted.");
    //your code here..
}
Reply
#4

^^^^^^^^
Reply
#5

If you take some effort in understanding the code you will be able to do that yourself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)