How to restrict a player from using a command ?
#3

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
Using a variable and 'if' statement.

Example:

pawn Код:
CMD:whatever(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF,"ERROR: You are not admin!");  //You can change IsPlayerAdmin to your variable
   //Your codes
   return 1;
}
IsPlayerAdmin is default sa-mp RCON administrator check. This will check if the player is an RCON administrator.
You need to create your own variable to make this, i prefer you should check some of admin scripts on this forums.
I don't think you red my post... i already have an admin system and know how to do admin only commands... i gotta be able to restrict players when i'm in-game.... please check the post
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)