I Need help please
#3

For me the best way is by using OnPlayerText(playerid);.

Example code ;
pawn Код:
public OnPlayerText(playerid, text[])
{
    new string[154];
    new pname[MAX_PLAYER_NAME+1];
    GetPlayerName(playerid, pname, sizeof(pname)); // GetTheName.
    if(IsPlayerAdmin(playerid)) // if he is admins
    {
        format(string, sizeof(string), "[AU] %s : %s", name, text); // like : [AU] Matnix : Hello world!
        SendClientMessageToAll(string); // send the message with your tag.
    }
    else // if he isn't an admins.
    {
        format(string, sizeof(string), "%s : %s", name, text);
        SendClientMessageToAll(string); // send the message without tag.
    }
    return 1;
}
and, if you don't want him to use your tag :
pawn Код:
public OnPlayerConnect(playerid)
{
    new name[24];
    GetPlayerName(playerid,name,sizeof(name));
    if(strfind(name,"[AU]",true) != -1)
    {
        if(IsPlayerAdmin(playerid))
        {
            // set the admins name to the new one with a tags.
        }
        else
        {
            // kick him with a message to inform him he can't use this tags.
        }
    }
    return 1;
}
Reply


Messages In This Thread
I Need help please - by xXMidOXx - 08.09.2013, 00:57
Re: I Need help please - by zrelly - 08.09.2013, 01:05
Re : I Need help please - by Matnix - 08.09.2013, 01:13
Re: I Need help please - by XcorelloX - 08.09.2013, 01:34
Re : I Need help please - by Matnix - 08.09.2013, 01:37
Re: I Need help please - by xXMidOXx - 08.09.2013, 02:03
Re: I Need help please - by xXMidOXx - 08.09.2013, 02:19

Forum Jump:


Users browsing this thread: 2 Guest(s)