Longer /me's, that carry onto another line?
#1

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

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

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

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

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
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.
Damn! Rep. Thanks for finding that for me. I'll use that right away!
I'll see if it works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)