Hello guys how are you doing today its nice weather huh? this is used with textdraws.
Hello guys how are you doing today its nice weather huh? this is used with textdraws.
Hello guys how are you doing today ~n~its nice weather huh?~n~ this is used with textdraws.
if(strlen(stringhere) >= size-at-which-you-must-split-the-text) //If string "stringhere"'s string length is over "size-at-which-you-must-split-the-text", do the following:
{
strmid(string, stringhere, size-at-which-you-must-split-the-text, textsizeend);//Split string, extract beginning at size-at-which-you-must-split-the-text, and the end of textsizeend, and store it in the variable "string"
strdel(stringhere, size-at-which-you-must-split-the-text, textsizeend); //Delete the second part from the string "stringhere", to prevent it from the text being there twice
format(string, sizeof(string), "%s~n~%s", stringhere, string);//Format the string with the ~n~ inbetween the two strings
//Do whatever with string now
}
pawn Код:
|
/testcommand Testing out my sick thing... blabla... (20+ characters later) blablablatestbla
Testing out my sick thing... blabla... blablabl atestbla
for(new i = 30, j = strlen(text); i < j; i += 30)
{
strins(text, "~n~", i);
}
MultiLineString(string[], charactersPerLine = 30, separator[5] = "~n~")
{
for(new i = charactersPerLine, len = strlen(string); i + 30 < len; i += 30)
{
strins(string, separator, i);
}
return string;
}
GameTextForAll(MultiLineString("hi my name is bob and i ride a little pony whos name is my little pony and i like making love to it"), 3000, 5);