SA-MP Forums Archive
Tiny OOC chat problem - 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: Tiny OOC chat problem (/showthread.php?tid=146824)



Tiny OOC chat problem - Jochemd - 09.05.2010

Hello,

pawn Код:
if(strcmp("/ooc", cmdtext, true, 4) == 0)
    {
    if(OocChatEnable == 1)
    {
    if ((strlen(cmdtext) >= 1)&&(strlen(cmdtext) <= 4)) { SendClientMessage(playerid,0x6495EDAAA, "Usage: /ooc [Message]"); return 1;}
    GetPlayerName(playerid,oocname,sizeof(oocname));    format(string,sizeof(string),".:: [OOC] %s: %s",oocname,cmdtext[3]); SendClientMessageToAll(0x000FFFFF, string);
    }
    else
    SendClientMessage(playerid,0xDCDCDCFF," The OOC chat has been disabled.");
    return true;
    }
This gives ingame as: .:: [OOC] [GTAPR]Jochemd: c Test. Does someone know why it gives that 'c' before my text? I can't find anything about it in the script I created for OOC :S

Regards, Jochem

EDIT: Fixed. I truened the value of cmdtext[3] some higher (to 5)