SendClientMessage cuts after a few words
#1

Yeah so when it shows the format it doesnt show the lines and it only shows your stats until the word kill and it cuts from there
Код:
CMD:stats(playerid, params[])
{
	if(PlayerInfo[playerid][pAlive] > 0)
	{
		new result[128];
		new score = GetPlayerScore(playerid);
		new cash = GetPlayerMoney(playerid);
		new admin = PlayerInfo[playerid][pAdmin];
		new kills = PlayerInfo[playerid][pKills];
		new deaths = PlayerInfo[playerid][pDeaths];
		format(result,sizeof(result), "{F71414}Score: {FFFFFF}[%d]{F01AAC} | {F71414}Money: {FFFFFF}[%d]{F01AAC} | {F71414}Admin level: {FFFFFF}[%d]{F01AAC} | {F71414}Kills: {FFFFFF}[%d]{F01AAC} | {F71414}Deaths: {FFFFFF}[%d]", score, cash, admin, kills, deaths);
		SendClientMessage(playerid, -1, "{FF0808}-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
 		SendClientMessage(playerid, -1, result);
 		SendClientMessage(playerid, -1, "{FF0808}-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
	}
	else
	{
 		SendClientMessage(playerid, -1, "{8F8F8F}You have to be alive to do this.");
	}
    return 1;
}
Reply
#2

The string where you're storing the text is too small (the array 128 cells, yet the whole string is 186 characters). Split it in different lines.
Reply
#3

Cool but why doesnt it show the red lines i made?
Reply
#4

Because they're over 128 characters long, trim it.
Reply
#5

Cause they're alot of characters.

EDIT: Guy above me posted before me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)