[HELP]Admin name prefix
#2

As I understand you want to add the prefix to the player's name without changing the name?
pawn Код:
//Something like this would work:
public OnPlayerText(playerid, text[])
{
    if(Your admin check here)
    {
        new pName[MAX_PLAYER_NAME], String[128], Prefix[] = "[Admin]";
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "%s%s %s", Prefix, pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    return 1;
}

//Or more simple:
public OnPlayerText(playerid, text[])
{
    if(Your admin check here)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "[Admin]%s %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    return 1;
}
Reply


Messages In This Thread
[HELP]Admin name prefix - by Jesus_wow - 02.02.2012, 19:31
Re: [HELP]Admin name prefix - by Fj0rtizFredde - 02.02.2012, 19:51
Re: [HELP]Admin name prefix - by Saw® - 02.02.2012, 19:55
Re: [HELP]Admin name prefix - by Jesus_wow - 02.02.2012, 20:08
Re: [HELP]Admin name prefix - by d0nTtoucH - 26.10.2014, 15:47
Re: [HELP]Admin name prefix - by mkmk - 26.10.2014, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)