/me cmd
#1

ok so i compiled without any eroors or wanring's but when i went in-game to test it it said it was an invalid command

heres my code

Код:
	if (strcmp("/me", cmdtext, true, 10) == 0)
	{
	    new me[20];
	    new text[19];
	    new name[MAX_PLAYER_NAME];
	    format(me, sizeof(me), "*%s %s", name, text);
		SendClientMessageToAll(COLOR_WHITE, me);
		IRC_GroupSay(gGroupID, IRC_CHANNEL, me);
		IRC_GroupSay(gGroupID, ADMIN_IRC_CHANNEL, me);
		return 1;
	}
Reply
#2

Код:
if (strcmp("/me", cmdtext, true, 3) == 0)
	{
	    new me[20];
	    new text[19];
	    new name[MAX_PLAYER_NAME];
	    format(me, sizeof(me), "*%s %s", name, text);
		SendClientMessageToAll(COLOR_WHITE, me);
		IRC_GroupSay(gGroupID, IRC_CHANNEL, me);
		IRC_GroupSay(gGroupID, ADMIN_IRC_CHANNEL, me);
		return 1;
        }
This may help you!
Reply
#3

Take this :
Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
    {
        if(!cmdtext[3])return SendClientMessage(playerid, COLOR_INFOTEXT, "USAGE: /me [action]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        SendClientMessageToAll(COLOR_BEIGE, str);
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)