How to make string ? -
[M.A]Angel[M.A] - 24.07.2012
Hello, I need to make in my server when someone talk can talk long example
Test: Hello , my name is Test and i m playing samp , I'm 16 Old , from israel
Not as this
Test: Hello , my name is Test and i m playing
samp , I'm 16 Old , from israel
---------> I dont know what this is called but i think it's will be in OnPlayerText string[DONTKNOWXD]
Re: How to make string ? -
milanosie - 24.07.2012
String is a flexible piece of rope or twine which is used to tie, bind, or hang other objects.
Examples of string use include:
In musical instruments (see below)
Bow string, for propelling an arrow
Drawstring
Kite
Pullstring
String art
String bag
String bondage
String figure, design formed by weaving string around one's fingers
Stampede string, a long string usually
To make them, simply tie two or more ropes/twines together.
Re: How to make string ? -
[M.A]Angel[M.A] - 24.07.2012
Can u give me the script , maybe will be :
String[128];?
Re: How to make string ? -
Akira297 - 24.07.2012
Quote:
Originally Posted by [M.A]Angel[M.A]
Hello, I need to make in my server when someone talk can talk long example
Test: Hello , my name is Test and i m playing samp , I'm 16 Old , from israel
Not as this
Test: Hello , my name is Test and i m playing
samp , I'm 16 Old , from israel
---------> I dont know what this is called but i think it's will be in OnPlayerText string[DONTKNOWXD]
|
Are you trying to make it go global or just nearby players?
Re: How to make string ? -
milanosie - 24.07.2012
pawn Код:
new string[128];
new float:x, float:y, float:z;
GetPlayerPos(playerid, x, y, z);
new name[24];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string),"%s Says: %s", name, text);
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(i, 15, x, y, z)) SendClientMessage(i, 0x0000FF, string);
}
return 0;
Add on OnPlayerText
Re: How to make string ? -
[M.A]Angel[M.A] - 24.07.2012
Another qus , if i added the ID before that name so i will be [ID:0]Test: %s , i will got error this is right? i will got black color when someone talk or white , not all the colors
Re: How to make string ? -
milanosie - 24.07.2012
I don't get it.
Re: How to make string ? -
Kindred - 24.07.2012
This is how you'd add an ID to the thing as-well if thats what you are looking for:
pawn Код:
new string[128];
new float:x, float:y, float:z;
GetPlayerPos(playerid, x, y, z);
new name[24];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string),"[ID:%i]%s Says: %s", playerid, name, text);
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(i, 15, x, y, z)) SendClientMessage(i, 0x0000FF, string);
}
return 0;
Since you want the players ID, it needs to be an integer, therefore the %i is needed (or %d)
Re: How to make string ? -
[M.A]Angel[M.A] - 24.07.2012
U added an white color ? cant add all the colors?
Re: How to make string ? -
Kindred - 24.07.2012
You should define colors at the top of your script like this:
Get an html color code, and do this:
Of course, this is not the thing I want to do, seeing as it is not in the correct format. Simply do this to change it.
See what I added? I added the 0x in front of it as-well as two more letters at the end. The last two are for alpha, of which you can change to a number for the alpha if needed.
Then, when you want to use the color, simply do something like this
pawn Код:
SendClientMessage(playerid, COLOR_WHITE, "Sends this color in white");
So it will look like this:
Sends this color in white