SA-MP Forums Archive
[HELP] Double lines - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Double lines (/showthread.php?tid=190343)



[HELP] Double lines - joeri55 - 14.11.2010

I want to create something for example:

Joeri55 Says: Hello Hello Hello Hello Hello Hell..
Joeri55 Says: ..o Hello Hello Hello Hello Hello.

It cuts of at the piece that's to long and it goes farther on the next line.
I don't know how to script this.. Can anyone explain me how to do this?

This is my realchat:

Code:
    if (realchat)
    {
        if(gPlayerLogged[playerid] == 0)
        {
            return 0;
          }
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(!IsPlayerInAnyVehicle(playerid))
        {
            if(PlayerInfo[playerid][pMaskuse] == 1)
            {
                format(string, sizeof(string), "Stranger Says: %s", text);
                ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            }
            else
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                 format(string, sizeof(string), "Says: %s", text);
                if(PlayerInfo[playerid][pAccent] == 0) format(string, sizeof(string), "%s Says: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 1) format(string, sizeof(string), "%s Says [British Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 2)  format(string, sizeof(string), "%s Says [Japanese Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 3)  format(string, sizeof(string), "%s Says [Chinese Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 4)  format(string, sizeof(string), "%s Says [Korean Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 5)  format(string, sizeof(string), "%s Says [Scottish Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 6)  format(string, sizeof(string), "%s Says [Irish Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 7)  format(string, sizeof(string), "%s Says [Russian Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 8)  format(string, sizeof(string), "%s Says [American Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 9)  format(string, sizeof(string), "%s Says [Mexican Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 10)  format(string, sizeof(string), "%s Says [Texan Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 11)  format(string, sizeof(string), "%s Says [Cuban Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 12)  format(string, sizeof(string), "%s Says [Italian Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 13)  format(string, sizeof(string), "%s Says [Gangsta Accent]: %s", RemoveUnderScore(playerid), text);
                else if(PlayerInfo[playerid][pAccent] == 14)  format(string, sizeof(string), "%s Says [Australian Accent]: %s", RemoveUnderScore(playerid), text);
                else format(string, sizeof(string), "%s Says: %s", RemoveUnderScore(playerid), text);
                ProxDetector(30.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            }
        }
I hope someone knows how to do this.