SA-MP Forums Archive
[Include] [INC] Multi text lines - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [INC] Multi text lines (/showthread.php?tid=135023)



[INC] Multi text lines - KuHS - 18.03.2010

Multi text lines
Description

What it do?
It transfers string's text into two lines.

What it used for?
It's used for RolePlay servers. Basically most RP servers have /me /do /b commands. This function can transfer typed command text into multiple lines.

The text can be only up to 128 characters!


Full screenshot: http://i40.tinypic.com/xkotvc.png

Usage

Functions:
SendClientMessageA(playerid,color,text[])

Example:

Код:
public OnPlayerText(playerid, text[])
{
	new pName[MAX_PLAYER_NAME], msg[129];
	GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
	format(msg,sizeof msg,"%s says: %s",pName,text);
	SendClientMessageA(playerid,GREY,msg);
	return 0;
}
Installation:
You must put include to includes, and put this thing into your code (at includes ex.: #include <a_samp>)
Код:
#include <multilines>
And you're done.

Versions

v1.0 (2010-03-1: Created include, next version will be included with ProxDetector.
Download:

http://pastebin.com/TRLPpwYy


Re: [INC] Multi text lines - Tomejus - 18.03.2010

Whoa! Very nice. Good script for good servers!


Re: [INC] Multi text lines - SlashPT - 18.03.2010

didnt understood and Screens??


Re: [INC] Multi text lines - KuHS - 18.03.2010

Quote:
Originally Posted by DarK TeaM PT
didnt understood and Screens??
Added screenshots.


Re: [INC] Multi text lines - cyber_punk - 18.03.2010

I am sorry but string splitting is just not that hard, would be much more useful if you found the closest space (delimiter) and split it on that instead of splitting whole words. Then I would call it a useful script....


Re: [INC] Multi text lines - NiiRV4N4 - 30.05.2010

Quote:
Originally Posted by cyber_punk
I am sorry but string splitting is just not that hard, would be much more useful if you found the closest space (delimiter) and split it on that instead of splitting whole words. Then I would call it a useful script....
It's useful as it is.


Re: [INC] Multi text lines - Packadore - 30.05.2010

Nice, i hate it when chat lines go over the healthbar, this will stop that.


Re: [INC] Multi text lines - Aleks7 - 30.05.2010

Thanks so much for this script !!
I love you !


Re: [INC] Multi text lines - Visualbr - 30.05.2010

Does it work for /b and /ooc?


Re: [INC] Multi text lines - cmg4life - 30.05.2010

awesome idea dude.


Re: [INC] Multi text lines - Mujib - 30.05.2010

Quote:
Originally Posted by Visualbr
Does it work for /b and /ooc?
Only if you use 'SendClientMessageA' in your /b and /ooc commands.


Re: [INC] Multi text lines - cmg4life - 31.05.2010

BTW Add this too :P
Code:
stock SendClientMessageToAllA(color,text[])
{
    if(strlen(text) <= 68) SendClientMessageToAll(color,text);
    else {
      new texts[61];
      strmid(texts,text,68,129);
        strins(text, "-", 68, 1);
        strdel(text, 69, 129);
        SendClientMessageToAll(color,text);
        SendClientMessageToAll(color,texts);
    }
}



Re: [INC] Multi text lines - gimini - 31.05.2010

Oh, nice one! Thanks


Re: [INC] Multi text lines - Cameltoe - 31.05.2010

Lovely script m8!




Re: [INC] Multi text lines - deather - 13.06.2010

Great. But cyber_punk's idea would have been cool if it had been done.


Re: [INC] Multi text lines - Iceaac - 09.07.2010

Very nice, awesome idea!


Re: [INC] Multi text lines - JM - 10.07.2010

Nice work, but is very bugged, sometimes you write:

Code:
0123456789012345678901234567890123456789012345678901234567890123456789
and you get

Code:
X says: 01234567890123456789012345678-456789
9012345678901234567890123
You should take a look and test it :P