[Include] [INC] Multi text lines
#1

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
Reply
#2

Whoa! Very nice. Good script for good servers!
Reply
#3

didnt understood and Screens??
Reply
#4

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

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....
Reply
#6

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.
Reply
#7

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

Thanks so much for this script !!
I love you !
Reply
#9

Does it work for /b and /ooc?
Reply
#10

awesome idea dude.
Reply
#11

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

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);
    }
}
Reply
#13

Oh, nice one! Thanks
Reply
#14

Lovely script m8!

Reply
#15

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

Very nice, awesome idea!
Reply
#17

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)