SA-MP Forums Archive
/o(oc) command - 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: /o(oc) command (/showthread.php?tid=470961)



/o(oc) command - ajam112 - 20.10.2013

i got problem with my ooc command, when i type about 100 letters, it only slow about 50.. can someone help me?

pawn Код:
COMMAND:o(playerid, params[])
{
    if(PlayerTemp[playerid][muted]) return SendClientError(playerid, "You are muted!");
    if(!oocenable && !PlayerInfo[playerid][power] && !PlayerInfo[playerid][helper]) return SendClientError(playerid, "OOC is off!");
    new iText[ 150 ];
    if(sscanf(params, "s", iText)) return SCP(playerid, "[msg]");
    if(PlayerInfo[playerid][power] || PlayerInfo[playerid][helper] || PlayerInfo[playerid][power] != 31337)
    {
        format(iStr,sizeof(iStr),"{8bbc8b}(( {CCFFCC}%s %s: %s {8bbc8b}))",AdminLevelName(playerid), AnonAdmin(playerid),iText);
        SendMessageToAll(0xCCFFCC00, iStr);
    }
    else
    {
        format(iStr,sizeof(iStr),"{8bbc8b}(( [OOC] {CCFFCC}%s: %s {8bbc8b}))",RPName(playerid),iText);
        PlayerLoop(f) { if(PlayerTemp[f][oocoff]==0) SendMessageToPlayer(f,0xCCFFCC00,iStr); }
    }
    format(iStr, sizeof(iStr), "10(( [Global OOC]: %s %s: %s ))", AdminLevelName(playerid),PlayerName(playerid), iText);
    iEcho(iStr);
    return 1;
}



Re: /o(oc) command - iGetty - 20.10.2013

First of all:

pawn Код:
if(sscanf(params, "s", iText)) return SCP(playerid, "[msg]");
should be:

pawn Код:
if(sscanf(params, "s[150]", iText)) return SCP(playerid, "[msg]");
Show me the iStr variable define please.


Re: /o(oc) command - ajam112 - 21.10.2013

Hm.. nevermind.. thank you help me a bit Getty, you also help solved my problem c: