How to make this command
#1

Well i need help making a command called like /admint
and when a level 3+ admin does it a message comes up like this to all players
lets say admin does
/admint Guys server will restart
it will show up like this
Admin Name Says: Guys server will restart
please help
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/admint", cmdtext, true, 7) == 0)
    {
        new PlayerName[MAX_PLAYER_NAME], str[128];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        format(str, sizeof(str), "* admin %s(%d) has restarted the server!", PlayerName, playerid);
        SendClientMessageToAll(colour, str);
        return 1;
    }
    return 0;
}
now just add a check for what level the player is and maybe set a timer to restart the server and that should work nicely
Reply
#3

Thanks but i was getting at like the admin can type what ever they want
Reply
#4

How you define your admin's level?
Reply
#5

colour should be COLOUR.
Reply
#6

Quote:
Originally Posted by Rks_
colour should be COLOUR.
i don't think it really matters
Reply
#7

Quote:
Originally Posted by Rks_
colour should be COLOUR.
Huh? You're kidding right?
It depends how he defined it.
Reply
#8

i just said the way i am used to things.
Reply
#9

That command gave me errors!
Reply
#10

Quote:
Originally Posted by WarLord
That command gave me errors!
what errors did you get?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)