How would I do if a line is to long to make a new one -
Zalman - 05.04.2013
As the title says how would I do it if a line is to long to make a new one and paste the rest of the text there.
Re: How would I do if a line is to long to make a new one -
iggy1 - 05.04.2013
Quote:
Originally Posted by Zalman
How would I do if a line is to long to make a new one
|
Sniff it all in one go!
If you mean client message, yes split the message and send two.
Re: How would I do if a line is to long to make a new one -
Rohan_Ubhare - 05.04.2013
I don't really know wht u mean Do mean this?
Like if a sentence is - Welcome to this Server, Have a fun time playing here, Invite ur friends to get gifts etc..
And the screen fits only till 'Have a funtime playing here,' then you do it like this
pawn Код:
SendClientMessage(playerid, RED, "Welcome to this Server, Have a fun time playing here,");
SendClientMessage(playerid, RED, "Invite ur friends to get gifts etc..
This will be shown like this on their screen-
Welcome to this Server, Have a fun time playing here,
Invite ur friends to get gifts etc..
You paste this one below the other if you want them to be shown on the screen all together.
Re: How would I do if a line is to long to make a new one -
Zalman - 05.04.2013
Quote:
Originally Posted by Rohan_Ubhare
I don't really know wht u mean Do mean this?
Like if a sentence is - Welcome to this Server, Have a fun time playing here, Invite ur friends to get gifts etc..
And the screen fits only till 'Have a funtime playing here,' then you do it like this
pawn Код:
SendClientMessage(playerid, RED, "Welcome to this Server, Have a fun time playing here,"); SendClientMessage(playerid, RED, "Invite ur friends to get gifts etc..
This will be shown like this on their screen-
Welcome to this Server, Have a fun time playing here,
Invite ur friends to get gifts etc..
You paste this one below the other if you want them to be shown on the screen all together.
|
Sorry I ment for chats i.e like a /n so if the input text was to long it made a new line and continued.
Re: How would I do if a line is to long to make a new one -
Rohan_Ubhare - 05.04.2013
Will u show me your /n I'll add it and give it to you.
Re: How would I do if a line is to long to make a new one -
Zalman - 05.04.2013
Quote:
Originally Posted by Rohan_Ubhare
Will u show me your /n I'll add it and give it to you.
|
pawn Код:
format(string, sizeof(string), "{4978BA}(N) {1958B0}%s {4978BA}%s: {1958B0}%s", OOCRanks[Rank1], GetName(playerid), params);
SendClientMessageToAll(NEWBIE_CHAT, string);
Player[playerid][CanUseNewbie] = 0;
Re: How would I do if a line is to long to make a new one -
MP2 - 05.04.2013
Depends what the line is. If it's a string, use strcat.
P.S. you can use a backslash to make lines spread over multiple lines, or sometimes just go on to a new line anyway:
pawn Код:
new string[] = \
"Hello World!\
Don't you just love backslashes?"\
I do.";
pawn Код:
new
x,
y,
z;
SetPlayerPos(
playerid,
0.0,
0.0,
3.0
);
Spreading parameters over multiple lines can be extremely helpful for readability, especially when dealing with many parameters.
If your parameters are too long, store them in local variables.
NOTE: Using these methods will not circumvent the 'input line too long' error (well, strcat will but the others).
P.S. code not texted sorry. I'm on my iPhone. It's just an example anyway.
Re: How would I do if a line is to long to make a new one -
Shoulen - 05.04.2013
I think what he's asking is that if the player types something in some sort of chat system using /n, how can he make it in such a way that if the player types too many characters for the string, it places the remainder of the string that will cut off, on to the next line.
http://forum.sa-mp.com/showpost.php?...1&postcount=10 < There