[HELP]Admin in front of my name
#4

Exactly what Dwane said, but in code format:

pawn Code:
public OnPlayerText(playerid, text[]) //This is called every time a player tries to type something, other than a command, such as when talking to other players
{
    if(IsPlayerAdmin(playerid)) //If they are an admin, you can replace this with your own admin variable
    {
        new string[150], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        format(string,sizeof(string),"[ADMIN] %s: %s", name, text); //Editing the format and adding admin tag in front of name
        SendClientMessageToAll(0xFFFF00FF, string); //Sends message to all
        return 0; //Return false for sending custom chat, so it doesn't send your message twice
    }
    return 1; //Otherwise return 1 and send the message as normal
}
Reply


Messages In This Thread
[HELP]Admin in front of my name - by nhunor58 - 29.12.2012, 20:00
Re: [HELP]Admin in front of my name - by hydravink - 29.12.2012, 20:41
Re: [HELP]Admin in front of my name - by Konstantinos - 29.12.2012, 20:54
Re: [HELP]Admin in front of my name - by Threshold - 30.12.2012, 00:02
Re: [HELP]Admin in front of my name - by SwisherSweet - 30.12.2012, 03:30
Re: [HELP]Admin in front of my name - by Feastahashi - 30.12.2012, 03:33
Re: [HELP]Admin in front of my name - by nhunor58 - 30.12.2012, 06:36
Re: [HELP]Admin in front of my name - by Threshold - 30.12.2012, 09:42
Re: [HELP]Admin in front of my name - by Konstantinos - 30.12.2012, 09:52
Re: [HELP]Admin in front of my name - by nhunor58 - 30.12.2012, 11:01

Forum Jump:


Users browsing this thread: 1 Guest(s)