[GameMode] Counter-Strike: Battleship [ENG/RUS] (WCSBS Rebuild)
#7

Quote:
Originally Posted by Camacorn
View Post
1) You have 128 cell arrays for every string in your gamemode, an example can be found below.

Code:
stock ConnectPlayer(playerid)
{
	new string[128];
	format(string, sizeof(string), "Join/вступать: %s (%d)", GetUserName(playerid), playerid);
	SendClientMessageToAll(GREY, string);
	return 1;
}
The maximum length of a player name in SA:MP is 24 characters, plus the 19 characters from Join/вступать:, and the player ID. Put that all together and you come out with 43 characters. The array size should be 44 cells, 43 for the string, and 1 null.
Please excuse my lazy cell sizes. I CBF counting cells sometimes.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)