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



problem with chat - xir - 13.02.2011

hello,

no matter which command I use, and I write many letters it will not show the whole thing

example the admin chat

I write this: "gasgjasgsasgjasgasghajgagasjgajgjashgahgsagasgjas gajjasjhasghsgjhasjhajhajhasgjh"
and it will only show this: "gasgjasgsasgjasgasghajgagasjgajgjashg"

its same with ban reason, kick reason .. also it says. sscanf warning: string overblow or something

here is my admin chat

pawn Код:
COMMAND:a(playerid, params[])
{
    if(!PLVL[playerid]) return 0;
    if(PlayerInfo[playerid][pAdminLevel] < 1) return false;
    if(sscanf(params, "s", params[0])) return SendClientMessage(playerid, Yellow, "Usage: /a <message>");
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "Level: %d | Admin %s: %s", PlayerInfo[playerid][pAdminLevel], name, params);
    MessageToAdmins(AdminColor, string);
    return 1;
}



Re: problem with chat - HyperZ - 13.02.2011

pawn Код:
COMMAND:a(playerid, params[])
{
    if(!PLVL[playerid]) return 0;
    if(PlayerInfo[playerid][pAdminLevel] < 1) return false;
    if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid,Yellow, "Usage: /a <message>");
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "Level: %d | Admin %s: %s", PlayerInfo[playerid][pAdminLevel], name, params);
    MessageToAdmins(AdminColor, string);
    return 1;
}



Re: problem with chat - Stigg - 13.02.2011

string[128]

The Number value needs to be bigger to show more characters.

Eg: string[256]

Peace...


Re: problem with chat - xir - 13.02.2011

Thanks Clive it works

and i dont think so stigg


Re: problem with chat - Stigg - 13.02.2011

Quote:
Originally Posted by xir
Посмотреть сообщение
Thanks Clive it works

and i dont think so stigg
Sozz, i missunderstood. Tired eyes lol

Peace...