SA-MP Forums Archive
String doesnt print all the way - 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)
+--- Thread: String doesnt print all the way (/showthread.php?tid=442877)



String doesnt print all the way - Sellize - 09.06.2013

Please help me why doesnt it show the whole line

Код:
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
	    GetPlayerName(playerid, name, sizeof(name));
	    format(string, sizeof(string), "{FA6B3C}Server manager {ED6868}%s {FA6B3C}has initiated a server restart.", name);
	    SendClientMessageToAll(0xC4C4C4FF, string);
	    SendClientMessageToAll(0xFA0A0AFF, "Server restart in 10 seconds...");
	    SetTimer("gmx", 10000, false);



Re: String doesnt print all the way - Vince - 09.06.2013

Same problem as this one: https://sampforum.blast.hk/showthread.php?tid=442874


Re: String doesnt print all the way - Sellize - 09.06.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
Yeah thats what i tought but how do i modify the string length on this?


Re: String doesnt print all the way - Guest123 - 09.06.2013

pawn Код:
print(string);
hmm what you problem ?


Re: String doesnt print all the way - Chris10 - 09.06.2013

Just change from string[24+MAX_PLAYER_NAME+1];
to: string[128+MAX_PLAYER_NAME+1];


Re: String doesnt print all the way - Guest123 - 09.06.2013

try this
pawn Код:
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Server manager %s has initiated a server restart.", str);
print(str);