Longer /me's, that carry onto another line? - 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)
+--- Thread: Longer /me's, that carry onto another line? (
/showthread.php?tid=538164)
Longer /me's, that carry onto another line? -
NRG2 - 20.09.2014
Hi,
I'm wondering on how to exceed the limit '/me [action]' command text. So it carries onto the next line making the /me look much neater.
Here's the /me command so far, I know it has something to do with strlen's but I have no idea how to do it myself.
Код:
COMMAND:me(playerid, params[])
{
new action[128], string[246];
if(sscanf(params, "s[128]", action)) return SCME(playerid, COLOR_ORANGE, "USAGE: {FFFFFF}/me [action]");
else
{
format(string, sizeof(string), "* %s %s",RPName(playerid),action);
SendNearbyMessage(playerid, COLOR_PURPLE, string, 30.0);
}
return 1;
}
Re: Longer /me's, that carry onto another line? -
Team_PRO - 20.09.2014
change the string to more higher
you might wanna try this:
pawn Код:
COMMAND:me(playerid, params[])
{
new action[200], string[246];
if(sscanf(params, "s[128]", action)) return SCME(playerid, COLOR_ORANGE, "USAGE: {FFFFFF}/me [action]");
else
{
format(string, sizeof(string), "* %s %s",RPName(playerid),action);
SendNearbyMessage(playerid, COLOR_PURPLE, string, 30.0);
}
return 1;
}
Re: Longer /me's, that carry onto another line? -
SickAttack - 20.09.2014
You could give my include a shot, it will automatically jump to a new line when the max lenght is reached.
Link:
http://forum.sa-mp.com/showthread.ph...41#post3086141.
Please note, the code isn't updated to the latest version, I'll probably update it some day.
Re: Longer /me's, that carry onto another line? -
Stinged - 20.09.2014
Quote:
Originally Posted by Team_PRO
change the string to more higher
you might wanna try this:
pawn Код:
COMMAND:me(playerid, params[]) { new action[200], string[246]; if(sscanf(params, "s[128]", action)) return SCME(playerid, COLOR_ORANGE, "USAGE: {FFFFFF}/me [action]"); else { format(string, sizeof(string), "* %s %s",RPName(playerid),action); SendNearbyMessage(playerid, COLOR_PURPLE, string, 30.0); } return 1; }
|
This is wrong.
Increasing the string size would not do anything.
SendClientMessage's limit is 128 characters, there is no way you can send more than that.
Re: Longer /me's, that carry onto another line? -
NRG2 - 20.09.2014
Quote:
Originally Posted by SickAttack
|
Damn! Rep. Thanks for finding that for me. I'll use that right away!
I'll see if it works.