[HELP] Duble Message
#1

When I write in chat:



And the script:

pawn Код:
if (realchat)
    {
        new String[128], Name[MAX_PLAYER_NAME], szName[MAX_PLAYER_NAME];
        if(gPlayerLogged[playerid] == 0)
        {
            return 0;
        }
        ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{0000FF}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 4)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{FF80FF}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 5)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{FF8000}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 6)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{008000}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 7)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{80FF00}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 8)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{800000}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 9)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{8080FF}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 10)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{FFFF00}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 12)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{00FF00}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 13)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{800080}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 14)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{FFFF80}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 15)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{00FFFF}%s :{FFFFFF} %s", szName, text);
        }
        ProxDetector(20.0,playerid,String,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
    }
Reply
#2

Can you show your onplayertext?
Reply
#3

Is too big....
Reply
#4

Quote:
Originally Posted by monster010
Посмотреть сообщение
Is too big....
Bro we need it to know exactly why and where it gets doubled!
Reply
#5

pawn Код:
if (realchat)
    {
        new String[128], Name[MAX_PLAYER_NAME], szName[MAX_PLAYER_NAME];
        if(gPlayerLogged[playerid] == 0)
        {
            return 0;
        }
        ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{0000FF}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 4)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{FF80FF}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 5)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{FF8000}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 6)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{008000}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 7)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{80FF00}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 8)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{800000}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 9)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{8080FF}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 10)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{FFFF00}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 12)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{00FF00}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 13)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{800080}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 14)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{FFFF80}%s :{FFFFFF} %s", szName, text);
        }
        else if(PlayerInfo[playerid][pMember] == 15)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{00FFFF}%s :{FFFFFF} %s", szName, text);
        }
        ProxDetector(20.0,playerid,String,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
        return 0;
    }
Try this if it didn't work show me your ProxDetector function
Reply
#6

http://pastebin.com/PsX8AzXi
Reply
#7

Put return before the proxdetector and tell if it works
Reply
#8

Код:
warning 225: unreachable code
Reply
#9

Try adding return 0; at the last line of onplayertext,
pawn Код:
else if(PlayerInfo[playerid][pMember] == 15)
        {
            GetPlayerName(playerid, Name, sizeof Name);
            format(String, sizeof String, "{00FFFF}%s :{FFFFFF} %s", szName, text);
        }
        ProxDetector(20.0,playerid,String,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
    }
    return 0;//here <<
}
Reply
#10

Don't work.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)