Another Help OnPlayerText - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Another Help OnPlayerText (
/showthread.php?tid=276510)
Another Help OnPlayerText -
lyrics - 14.08.2011
Hi i need another help about OnPlayerText
I want when my word is full there would be another new line like this!:
Код:
[SP]Mr.Kakashi[WP] : ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZZZZZZZZ
Please Help i hope you will
Re: Another Help OnPlayerText -
linuxthefish - 14.08.2011
SA-MP chat does that automatically i think, whats the problem?
Re: Another Help OnPlayerText -
lyrics - 14.08.2011
The problem is when i flood OnPlayerText the word reach on Health and this would be look like
Код:
[SP]Mr.Kakashi[WP] : Hi i would like to blah blah blah i'm the server own
Thats Happens
Re: Another Help OnPlayerText -
Kar - 14.08.2011
try this
http://forum.sa-mp.com/showthread.ph...ing#post232981
Re: Another Help OnPlayerText -
linuxthefish - 14.08.2011
A screenshot would be more helpfull. And thx for the 1000 posts!
Re: Another Help OnPlayerText -
lyrics - 14.08.2011
can i post it without any editing because i cant edit the screenshot i dont have anything program picture editing
Re: Another Help OnPlayerText -
linuxthefish - 14.08.2011
Yes!
Re: Another Help OnPlayerText -
lyrics - 14.08.2011
Heres The Screeshot
Re: Another Help OnPlayerText -
Scenario - 14.08.2011
I am hoping that someone could create and release something similar to what LS-RP has where it splits the text into multiple lines if you go over 128 characters.
Re: Another Help OnPlayerText -
Kar - 14.08.2011
Quote:
Originally Posted by RealCop228
I am hoping that someone could create and release something similar to what LS-RP has where it splits the text into multiple lines if you go over 128 characters.
|
I see my post was completely ignored, anyways look at this...
pawn Код:
#define MAX_CHARS_PER_LINE 80
#define FINAL_DOTS
stock sendLongMessage( playerid , color , message[] )
{
new len = strlen(message),
NumberOLines = len / MAX_CHARS_PERLineString;
if( ( len % MAX_CHARS_PERLineString ) ) NumberOLines++;
new LineString[MAX_CHARS_PERLineString + 5];
new CurrentLine;
while( CurrentLine < NumberOLines )
{
strmid( LineString, message, ( CurrentLine * MAX_CHARS_PER_LINE ), ( CurrentLine * MAX_CHARS_PER_LINE ) + MAX_CHARS_PER_LINE );
////////////
#if defined FINAL_DOTS
if( NumberOLines > 1 )
{
if( CurrentLine == 0 )
{
format( LineString, sizeof LineString, "%s ...", LineString );
}
else if( CurrentLine > 0 && ( CurrentLine + 1 ) < NumberOLines )
{
format( LineString, sizeof LineString, "... %s ...", LineString );
}
else
{
format( LineString, sizeof LineString, "... %s", LineString );
}
}
#endif
////////////
SendClientMessage( playerid, color, LineString );
///////////
CurrentLine++;
}
return 1;
}