Characters problem
#2

It's because of the "s" specifier in sscanf. You need to specify its lenght in square brackets otherwise it's by default 32. You also don't need sscanf for that and it can be done by isnull and "params".

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!");
    if(isnull(params)) 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),params);
        SendMessageToAll(0xCCFFCC00, iStr);
    }
    else
    {
        format(iStr,sizeof(iStr),"{8bbc8b}(( [OOC] {CCFFCC}%s: %s {8bbc8b}))",RPName(playerid),params);
        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), params);
    iEcho(iStr);
    return 1;
}
Reply


Messages In This Thread
Characters problem - by ajam112 - 30.05.2014, 17:14
Re: Characters problem - by Konstantinos - 30.05.2014, 17:19
Re: Characters problem - by ajam112 - 30.05.2014, 17:27
Re: Characters problem - by Konstantinos - 30.05.2014, 17:39

Forum Jump:


Users browsing this thread: 2 Guest(s)