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

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/adminship", cmdtext, true, 10) == 0)
{
IsPlayerAdmin(playerid) ;
{
SetPlayerPos(playerid, 3203.9760,-1472.5383,16.6099);
SendClientMessage(playerid, COLOR_GREEN, "Welcome to Admin Ship!");
return 1;
}
return 0;

thats wrong

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (strcmp("/adminsship", cmdtext, true, 10) == 0)
{
 if(IsPlayerAdmin(playerid))
{
    SetPlayerPos(playerid, 3203.9760,-1472.5383,16.6099);
    SendClientMessage(playerid, COLOR_GREEN, "Welcome to Admins Ship!");
}
   return 1;
  }
  return 0;
that should work
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)