OnPlayerText
#1

Hey guys, I'm trying to make it so that if a player is admin they see the global chat as

Name [Player's ID]: Text

If the player is not admin it's displayed as

Name: Text

Here is my code.
PHP код:
public OnPlayerText(playeridtext[])
{
    new 
string[200];
    if(
PlayerInfo[playerid][pAdmin] >= 1)
    {
        
format(stringsizeof(string), "%s {FFFFFF}[%d]: %s"GetName(playerid), playeridtext);
        
ABroadCast(GetPlayerColor(playerid), string1);
    }
    else if(
PlayerInfo[playerid][pAdmin] == 0)
    {
        
format(string,sizeof(string), "%s: %s"GetName(playerid), text);
        
SendClientMessageToAll(GetPlayerColor(playerid), string);
    }
    return 
1;
 } 
Do I need to make a stock that doesn't display the message to admins?
Reply


Messages In This Thread
OnPlayerText - by Tass007 - 18.08.2016, 11:15
Re: OnPlayerText - by Marricio - 18.08.2016, 12:09
Re: OnPlayerText - by iLearner - 18.08.2016, 12:14
Re: OnPlayerText - by Marricio - 18.08.2016, 12:17
Re: OnPlayerText - by sampkinq - 18.08.2016, 12:18
Re: OnPlayerText - by Stinged - 18.08.2016, 12:19
Re: OnPlayerText - by Tass007 - 19.08.2016, 05:51

Forum Jump:


Users browsing this thread: 4 Guest(s)