OnPlayerText
#1

PHP код:
{
    if(
pInfo[playerid][IsPlayerMuted] == 1)
    {
        
SendClientMessage(playerid,-1,"*"COL_RED" Ai mute!");
    }
    else
    {
        new 
message[257];
        if(
pInfo[playerid][pLogged] == 1)
        {
        
format(messagesizeof(message), "%s spune: %s"PlayerName(playerid), text);
        
ProxDetector(20.0playeridmessageCOLOR_WHITE);
        }
        
        if(
pInfo[playerid][pAdminDuty] == 1)
        {
        
format(messagesizeof(message), "Administrator %s spune: %s"PlayerName(playerid), text);
        
ProxDetector(20.0playeridmessageCOLOR_LIGHTBLUE);
        }
        if(
pInfo[playerid][pHelperDuty] == 1)
        {
        
format(messagesizeof(message), "Helper %s spune:  %s "PlayerName(playerid), text);
        
ProxDetector(20.0playeridmessageCOLOR_GREEN);
        } 

where should I add "else" ? Because on my text appears twice, and I want to appear only once. (If padminduty = 1, then plogged should not appear )
Reply


Messages In This Thread
OnPlayerText - by Zeus666 - 22.07.2016, 01:01
Re: OnPlayerText - by Jefff - 22.07.2016, 01:09
Re: OnPlayerText - by Zeus666 - 22.07.2016, 01:26

Forum Jump:


Users browsing this thread: 3 Guest(s)