SA-MP Forums Archive
AdminOOC wont show any message after maximum characters. - 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)
+--- Thread: AdminOOC wont show any message after maximum characters. (/showthread.php?tid=502747)



AdminOOC wont show any message after maximum characters. - seanny - 25.03.2014

The system below is to allow admins talk OOC locally, but my problem is that it wont continue on the next line after the maximum characters. It works when sending a message below 120 characters, but after that it sends nothing but a "(( [0] Sean_Mcelholm: ... ))" message.

pawn Код:
public AdminOOC(Float:radi, playerid, params[])
{
    if(DebugEnabled == 1) { printf("DEBUG: AdminOOC(%f, %d, %s)", radi, playerid, params); }
    if(IsPlayerConnected(playerid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        new string[256];
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        foreach(new i : Player)
        {
            if(GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(i)) continue;
            GetPlayerPos(i, posx, posy, posz);
            tempposx = (oldposx -posx);
            tempposy = (oldposy -posy);
            tempposz = (oldposz -posz);
            new playerworld, player2world;
            playerworld = GetPlayerVirtualWorld(playerid);
            player2world = GetPlayerVirtualWorld(i);
            if(playerworld == player2world)
            {
                if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                {
                    if(strlen(params) > 120)
                    {
                        new pos = 120;
                        while(params[--pos] > ' ') {}
                        if(pos < 120-1) pos = 120;
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{E6E6E6}: %.*s ... ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE1, string);
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{E6E6E6}: ... %s ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE1, string);
                    }
                    else
                    {
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{E6E6E6}: %s ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE1, string);
                    }
                }
                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                {
                    if(strlen(params) > 120)
                    {
                        new pos = 120;
                        while(params[--pos] > ' ') {}
                        if(pos < 120-1) pos = 120;
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{C8C8C8}: %.*s ... ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE2, string);
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{C8C8C8}: ... %s ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE2, string);
                    }
                    else
                    {
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{C8C8C8}: %s ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE2, string);
                    }
                }
                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                {
                    if(strlen(params) > 120)
                    {
                        new pos = 120;
                        while(params[--pos] > ' ') {}
                        if(pos < 120-1) pos = 120;
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{AAAAAA}: %.*s ... ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE3, string);
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{AAAAAA}: ... %s ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE3, string);
                    }
                    else
                    {
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{AAAAAA}: %s ))", playerid, GetNameEx(playerid), params);
                        BigMessage(i, COLOR_FADE3, string);
                    }
                }
                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                {
                    if(strlen(params) > 120)
                    {
                        new pos = 120;
                        while(params[--pos] > ' ') {}
                        if(pos < 120-1) pos = 120;
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{8C8C8C}: %.*s ... ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE4, string);
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{8C8C8C}: ... %s ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE4, string);
                    }
                    else
                    {
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{8C8C8C}: %s ))", playerid, GetNameEx(playerid), params);
                        BigMessage(i, COLOR_FADE4, string);
                    }
                }
                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                {
                    if(strlen(params) > 120)
                    {
                        new pos = 120;
                        while(params[--pos] > ' ') {}
                        if(pos < 120-1) pos = 120;
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{6E6E6E}: %.*s ... ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE5, string);
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{6E6E6E}: ... %s ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE5, string);
                    }
                    else
                    {
                        format(string, sizeof(string), "(( [%d] {FF9900}%s{6E6E6E}: %s ))", playerid, GetNameEx(playerid), params);
                        SendClientMessage(i, COLOR_FADE5, string);
                    }
                }
            }
        }
    }
    return 1;
}



Re: AdminOOC wont show any message after maximum characters. - ChuckyBabe - 25.03.2014

Then sent another command

like for example /o qiweqiowevuqiowuevqioweuqiwovueoqwuevoiqwuevoiqwue ioqw.....
then talk again what u will say on another line /o weiqwovheioqwevqwioeuviqwo

I think the script only used 120 characters because if u used more than that u can't see it it will glitch on your monitor screen

+rep if i help u


Re: AdminOOC wont show any message after maximum characters. - seanny - 26.03.2014

AdminOOC is only called on /b and OnPlayerText so using /o won't work at all.