[Tutorial] /me For RP Servers
#1

Most newbie might make rp and want to know how to make /me [action] CMD for example
* Tanush has punched CJ by the nose

Like if you do /me punches CJ by the nose. on server it will show to everyone * [yourname] punches CJ by the nose

ok Under OnPlayerCommandText add
pawn Код:
if(!strcmp(cmdtext, "/me", true, 3))
    {
        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(0xFF9900AA, str);
        return 1;
Your script should look like
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/me", true, 3))
    {
        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(0xFF9900AA, str); //I put orange cause i like it, you could change colour if you want to -.-
        return 1;
     }
     return 0;
}
pictures for example

LOOK AT SECOND LINE where it says * Zack_Bruseli shows middle finger". it will look like that

NOTICE:It's my first tutorial, i wish you like it .
Reply


Messages In This Thread
/me For RP Servers - by tanush - 23.02.2011, 23:57
Re: /me For RP Servers - by Snipa - 24.02.2011, 00:29
Re: /me For RP Servers - by tanush - 24.02.2011, 00:35
Re: /me For RP Servers - by BladerDildo - 24.02.2011, 02:10
Re: /me For RP Servers - by Haydz - 24.02.2011, 06:56
Re: /me For RP Servers - by admantis - 24.02.2011, 07:19
Re: /me For RP Servers - by Abreezy - 24.02.2011, 07:39
Re: /me For RP Servers - by alpha500delta - 24.02.2011, 08:42
Re: /me For RP Servers - by Nat_Pagle - 26.02.2011, 00:50
Re: /me For RP Servers - by alpha500delta - 26.02.2011, 09:00
Re: /me For RP Servers - by Steven82 - 01.03.2011, 04:05
Re: /me For RP Servers - by SkizzoTrick - 01.03.2011, 12:48
Re: /me For RP Servers - by Finn - 01.03.2011, 13:18
Re: /me For RP Servers - by SkizzoTrick - 01.03.2011, 19:19
Re: /me For RP Servers - by Steven82 - 01.03.2011, 23:16

Forum Jump:


Users browsing this thread: 1 Guest(s)