[Question]How to make a command admin only?
#7

Quote:
Originally Posted by [AC
Etch ]
try that :

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (strcmp("/adminship", cmdtext, true, 10) == 0)
{
 if(IsPlayerAdmin(playerid) ;
{
    SetPlayerPos(playerid, 3203.9760,-1472.5383,16.6099);
    SendClientMessage(playerid, COLOR_GREEN, "Welcome to Admin Ship!");
   return 1;
  }
  else { SendClientMessage(playerid, COLOR_GREEN, "Welcome to Admin Ship!"); }
  return 1;
  }
  return 0;
}
you have missed this .

if(!IsPlayerAdmin(playerid)) return 0;

Bryce now it will show Unknown command to non admins
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)