/stats Command = Server Crash
#1

Hello, why my server crash when i type this command?

Код:
CMD:stats(playerid,params[])
{
	new str[300];
	format(str,sizeof(str),"Megtekintйse Statisztika: %s","Viewing Stats from: %s",GetName(playerid));
	SendClientMessage(playerid,COLOR_GREEN,str);
	format(str,sizeof(str),"[Pontszбm: %s] [Pйnz: %d] [H-Цl: %d] [Z-Цl: %d] [Admin Szint: %d]","[Score: %s] [Money: %d] [H-Kills: %d] [Z-Kills: %d] [Admin Level: %d]",GetPlayerScore(playerid),GetPlayerMoney(playerid),Kills[playerid][EMBER],Kills[playerid][ZOMBI],GetPVarInt(playerid,"adminlevel"));
	SendClientMessage(playerid,COLOR_ORANGE,str);
	return 1;
}
Reply
#2

SendClientMessage can only handle so may characters.
If this message is long it will be whiped out and only the first 144 characters will be shown.

And, make sure there aren't any warnings in your script.
And make sure you have it under OnPlayerCommandText.
Reply
#3

Like Elie1996 said, client message can only display 144 characters, so change the size of str to 144 and try again. If it still crashes the server, then load crashdetect plugin and go in-game, type the command and if it crashes, then post the results.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)