SA-MP Forums Archive
/me command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /me command (/showthread.php?tid=165617)



/me command - FireCat - 05.08.2010

anyone have a clue how can i make like a /me command or something?like this




_______________________
[GDZ]leader



Re: /me command - Carlton - 05.08.2010

Check out released Roleplay scripts, there are many /me commands found in there.


Re: /me command - Jeffry - 05.08.2010

Here you go:

pawn Код:
if(!strcmp(cmdtext, "/me", true, 3))
    {
    if(cmdtext[3] == 0)
    {
    SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
    return 1;
    }
    new str[128], Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(str, sizeof(str), "* %s %s", Name, cmdtext[4]);
    SendClientMessageToAll(GetPlayerColor(playerid), str);
    return 1;
    }



Re: /me command - Kar - 05.08.2010

dw i'll do it..

pawn Код:
CMD:me(playerid, params[])
{
        if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "/me [text]");
        new string[128],pName[20 char];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "* %s %s *", pName, params);
        return SendClientMessageToAll(0xFFFFFFFF, string);
}
[edit]wow jeffery beat me amg


Re: /me command - MadeMan - 05.08.2010

It's a basic command with parameters.

Learn how to make commands first.

https://sampwiki.blast.hk/wiki/Fast_Commands


Re: /me command - FireCat - 05.08.2010

thx jeffry


Re: /me command - Hiddos - 05.08.2010

Well I've been a bit confused about jeffry's thingy, you might try this:

pawn Код:
if(!strcmp(cmdtext, "/me", true))
    {
    if(cmdtext[4] == ' ') return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
    new str[128], Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(str, sizeof(str), "* %s %s", Name, cmdtext[4]);
    SendClientMessageToAll(GetPlayerColor(playerid), str);
    return 1;
    }
Edit from Jeffry's


Re: /me command - Jeffry - 05.08.2010

@Hiddos: Iґm using this in my server, and it works.

@FireCat: Have fun.



Re: /me command - Guest3598475934857938411 - 07.08.2010

I agree with MadeMan here is a scripting help not script requesting! :P Um I think there is a forum in this forum on script requests use that, or either LEARN to code.