How to add a /me to a command
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        SendClientMessageToAll(0xFFFF00AA, str);
        return 1;
    }
    return 0;
}
ZCMD
pawn Код:
COMMAND:me(playerid, params[])
{
     if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
     new str[128];
     GetPlayerName(playerid, str, sizeof(str));
     format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
     SendClientMessageToAll(0xFFFF00AA, str);
     return 1;
}
Reply


Messages In This Thread
How to add a /me to a command - by BraynBoyj - 20.06.2011, 14:14
Re: How to add a /me to a command - by SpiderWalk - 20.06.2011, 14:32
Re: How to add a /me to a command - by Stigg - 20.06.2011, 14:33
Re: How to add a /me to a command - by Snipa - 20.06.2011, 14:37
Re: How to add a /me to a command - by Alvord - 20.06.2011, 14:43
Re: How to add a /me to a command - by BraynBoyj - 20.06.2011, 15:04
Re: How to add a /me to a command - by BraynBoyj - 20.06.2011, 15:18
Re: How to add a /me to a command - by Mean - 20.06.2011, 15:38
Re: How to add a /me to a command - by BraynBoyj - 20.06.2011, 15:41
Re: How to add a /me to a command - by Alvord - 20.06.2011, 15:43

Forum Jump:


Users browsing this thread: 2 Guest(s)