[Question] How to make an Admin command
#10

Код:
if (strcmp("/ls", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid, 1544.4379,-1353.2231,329.4744);
SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Los Santos!");
new name[MAX_PLAYER_NAME], string[100];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[TELEPORT] %s has gone to Los Santos [/ls]", name );
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an admin!");
return 1;
}
There you go.

the command only works for rcon admins
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)