Help with onplayertext
#2

pawn Код:
public OnPlayerText(playerid,text[])
{
    if(PInfo[playerid][pAdminDuty] == 1)
    {
        new pName[MAX_PLAYER_NAME],String[128],Prefix[24] = "Administrator";
        GetPlayerName(playerid,pName,24);
        format(String, sizeof(String), "%s %s: %s",Prefix,pName,text);
        SendClientMessageToAll(COLOR_GOLD,String);
        return 0;
    }
    if(PInfo[playerid][Level] > 1 && text[0] == '.')
    {
         new msg[128],pName[MAX_PLAYER_NAME];
         GetPlayerName(playerid,pName,sizeof pName);
         format(msg,sizeof(msg),"[ADMIN CHAT] %s[%d]: %s",pName,playerid,text[1]);
         MessageToAdmins(COLOR_MEDIUMSEAGREEN,msg);
         return 0;
    }
    return 0;
}
Reply


Messages In This Thread
Help with onplayertext - by Nabster - 19.02.2015, 08:39
Re: Help with onplayertext - by JeaSon - 19.02.2015, 08:50
Re: Help with onplayertext - by Nabster - 19.02.2015, 09:01
Re: Help with onplayertext - by Nabster - 20.02.2015, 05:59
Re: Help with onplayertext - by Gammix - 20.02.2015, 06:05
Re: Help with onplayertext - by Nabster - 20.02.2015, 06:41
Re: Help with onplayertext - by Gammix - 20.02.2015, 06:47
Re: Help with onplayertext - by Nabster - 20.02.2015, 06:51
Re: Help with onplayertext - by Excips - 20.02.2015, 07:00

Forum Jump:


Users browsing this thread: 3 Guest(s)