SA-MP Forums Archive
Disabling cmds, except a few ones. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Disabling cmds, except a few ones. (/showthread.php?tid=504815)



Disabling cmds, except a few ones. - VerticalGaming - 05.04.2014

Hello, I'm using this to stop players from using cmds when Heavily Wounded.
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: Invalid command, please use the available commands in /help.");
    else if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
    else if(PlayerInfo[playerid][pInjuried] == 2) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You cant do this when you're in heavily wounded modus.");
    return 1;
}
Can I add exceptions, like /b & /report etc? If so, how?

Regards, Vertical Gaming


Re : Disabling cmds, except a few ones. - MCZOFT - 05.04.2014

you can add commands yes but my question is , what kind of commands you want , in other way, what you are trying to do with thoes commands u want to add ?


Re : Disabling cmds, except a few ones. - MCZOFT - 05.04.2014

go to an exemple for an command already disabled, and give post it here so ican help you , i understand what you want now.


Re: Disabling cmds, except a few ones. - VerticalGaming - 05.04.2014

Solved.