command /me (easy help)
#10

I've changed the splitmessage into


Код:
stock SendSplitMessage(playerid, color, final[])
{
	new buffer[EX_SPLITLENGTH+5];
	new len = strlen(final);
	if(len>EX_SPLITLENGTH)
	{
	    new times = (len/EX_SPLITLENGTH);
		for(new i = 0; i < times+1; i++)
		{
			strdel(buffer, 0, EX_SPLITLENGTH+5);
			if(len-(i*EX_SPLITLENGTH)>EX_SPLITLENGTH)
			{
				strmid(buffer, final, EX_SPLITLENGTH*i, EX_SPLITLENGTH*(i+1));
				format(buffer, sizeof(buffer), "%s ...", buffer);
			}
			else
			{
			    strmid(buffer, final, EX_SPLITLENGTH*i, len);
			}
			SendClientMessage(playerid, color, buffer);
		}
	}
	else
	{
		SendClientMessage(playerid, color, final);
	}
}
this is my command me

Код:
CMD:me(playerid, params[])
{
    new string[128], action[128];
    if(sscanf(params, "s[128]", action))
    {
        SendClientMessage(playerid, -1, ""chat" /me [action]");
        return 1;
    }
    else
    {
        format(string, sizeof(string), "* %s %s", PlayerName(playerid), action);
        SendSplitMessage(playerid, COLOR_PURPLE, string);
        ProxDetector(30, playerid, string, COLOR_PURPLE);
    }
    return 1;
}
error in chat:

http://i.imgur.com/l2K2kuq.png

I want

Zeus666 wants to be friend with everyone but he never goes fully retarded like ....
... them i don't know why


and / or

Zeus666 wants to be friend with everyone but he never goes fully retarded li ....
... ke them i don't know why
Reply


Messages In This Thread
command /me (easy help) - by Zeus666 - 02.07.2016, 19:28
Re: command /me (easy help) - by oktokt1 - 02.07.2016, 22:32
Re: command /me (easy help) - by Zeus666 - 02.07.2016, 22:37
Re: command /me (easy help) - by oktokt1 - 02.07.2016, 22:49
Re: command /me (easy help) - by Dayrion - 02.07.2016, 23:05
Re: command /me (easy help) - by Golimad - 02.07.2016, 23:22
Re: command /me (easy help) - by Zeus666 - 03.07.2016, 07:34
Re: command /me (easy help) - by Dice_ - 03.07.2016, 07:42
Re: command /me (easy help) - by JohnBlaze1971 - 03.07.2016, 07:48
Re: command /me (easy help) - by Zeus666 - 03.07.2016, 07:51

Forum Jump:


Users browsing this thread: 3 Guest(s)