Messages realy short =s
#1

Hello all,

I'm trying to make an ooc chat (yeah by myself because i learn from doing things by myself XD)
now the problem was the if you typed like ffffffffffffffffffffffffffffffffffffffffffffffffff fffffffffffffffffffffffffffffffffffffff
it only showed like: ffffffffffffffffffffffffffffffffffffffff
so i made it much bigger but it stays the same..
the messages are really really really short..

pawn Код:
CMD:o(playerid, params[]) {
    if(OOC == true) {
    new message[400], pname[MAX_PLAYER_NAME], cmessage[500];
    GetPlayerName(playerid, pname, sizeof(pname));
    if(sscanf(params, "s", message)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /o (message)");
    format(cmessage, sizeof(cmessage), "(( OOC: %s: %s ))", pname, message);
    SendClientMessageToAll(COLOR_GREY, cmessage);
    } else {
    SendClientMessage(playerid, COLOR_GREY, "SERVER: The OOC chat is turned off.");
    }
    return 1;
}
help me please =)
Reply
#2

New command:

pawn Код:
CMD:o(playerid, params[]) {
    if(OOC == true) {
    new message[128], pname[MAX_PLAYER_NAME], cmessage[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /o (message)");
    format(cmessage, sizeof(cmessage), "(( OOC: %s: %s ))", pname, message);
    SendClientMessageToAll(COLOR_GREY, cmessage);
    } else {
    SendClientMessage(playerid, COLOR_GREY, "SERVER: The OOC chat is turned off.");
    }
    return 1;
}
Try it .
Reply
#3

You don't even need to use sscanf.
pawn Код:
CMD:o(playerid, params[])
{
    new string[128], pname[MAX_PLAYER_NAME];
    if(OOC == false) return SendClientMessage(playerid, COLOR_GREY, "SERVER: The OOC chat is turned off.");
    if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /o (message)");
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "(( OOC: %s: %s ))", pname, params);
    SendClientMessageToAll(COLOR_GREY, string);
    return 1;
}
Reply
#4

thanks=)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)