Putting 2 strings into one - 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: Putting 2 strings into one (
/showthread.php?tid=401420)
Putting 2 strings into one -
thefatshizms - 22.12.2012
Ok, I have this dialog which displays all commands for a admin rank. Well because there are so many commands for that rank the string is big and it wont fit on one lines (5 errors of input line to long etc) so i tried strcat to combine them, it didnt work then i tried inserting the string into the other and that didnt work.
Any solutions ?
pawn Код:
new Mega_String[2][400];
format(Mega_String[0], 400, "{FF0000}[CMD]{FFFFFF} /slap -{FF0000} Slaps a player into the air and reduces some health\n{FF0000}[CMD]{FFFFFF} /apm -{FF0000} Send an admin privite message to a player \
\n{FFFFFF} /mute -{FF0000} Mutes a player\n{FF0000}[CMD]{FFFFFF} /unmute -{FF0000} UnMutes a player\n{FFFFFF} /ann -{FF0000} Announces a message on the screen\n{FFFFFF} /disarm -{FF0000} Disarms a player");
format(Mega_String[1], 400, "\n{FFFFFF} /freeze -{FF0000} Freezes a player\n{FFFFFF} /unfreeze -{FF0000} Unfreezes a player\
\n{FFFFFF} /goto -{FF0000} Teleports yourself to the given player\n{FFFFFF} /bring -{FF0000} Bring a player to your position");
strins(Mega_String[0], Mega_String[1], 0);
Re: Putting 2 strings into one -
OxyG3N - 22.12.2012
Use strcat
pawn Код:
new epicString[1000];
strcat(epicString, "Commands...\n");
strcat(epicString, "Other stuff...");
Re: Putting 2 strings into one -
niels44 - 22.12.2012
Quote:
Originally Posted by thefatshizms
|
Quote:
Originally Posted by OxyG3N
|
really? you kiddin me? Mega_String? epicString? lolz xD and ye use strcat