ZCMD lenght
#1

Hello

Ive a problem with the lenght of strings and SendClientMessage. The lenght of a SCM from the server is much longer than one of a player.
I use ZCMD and before i used this, i didnt have the problem.

For a better understanding:
http://www.pic-upload.de/view-7820100/tja.jpg.html

Can anybody help me
MfG dUDA
Reply
#2

Show the /o command.
Reply
#3

Hello

Yeah sorry
http://pastebin.com/cTncP03f
Reply
#4

pawn Код:
COMMAND:o(playerid,params[])
{
    new string[128];
    if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "Verwendung: /o [Text]");
    {
        if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_RED, "Du wurdest gemuted. Schreibe per /report einen Admin an");
        {
            if(chatlock == 1 && PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, COLOR_RED, "Der Chat ist momentan gesperrt oder du bist kein Supporter/Admin");
            {
                if(CheckText(playerid, params)) return SendClientMessage(playerid,COLOR_RED,"Nicht in diesem Ton !");
                {
                    format(string, 128, "(( %s: %s ))", ReadName(playerid), params);
                    SendClientMessageToAll(COLOR_LIGHTBLUE, string);
                    OocLog(string);
                }
            }
        }
    }
    return 1;
}
Why you were using sscanf for this? There is no need at all, also, you were using a variable for two things...
Reply
#5

Hello

I dont read the strlen params thing, because i dont know it. THX, i will tets it

OK, goes
Thank you very much, hero of the day
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)