SA-MP Mobile

SA-MP Scripting and Plugins => Scripting Help => Help Archive => Topic started by: SA:MP on May 05, 2023, 08:51 AM

Title: commands
Post by: SA:MP on May 05, 2023, 08:51 AM
commands

How i can make it, if player have "CMD" = 1



that he can type no one command expect /help....



i can put this in each command, but can i do easier?:




pawn Code:

CMD:aaa(playerid, params[])
{
    if(GetPVarInt(playerid, "CMD") == 1)
    {
        SendClientMessage(playerid, -1, "You can only type /help!");
    }
    else
    {
    //my code goes here
    return 1;
}


and i must put that in each command, can it be some how easier?

Source: commands (https://sampforum.blast.hk/showthread.php?tid=278845)