Need /me cmds
#1

TITLE SAYS EVERYTHING!
Reply
#2

PHP код:
CMD:me(playeridparams[])
{
   new 
string[75], name[MAX_PLAYER_NAME];
   if(
isnull(params)) return SendClientMessage(playerid, -1"/me [text]");
   
GetPlayerName(playeridnameMAX_PLAYER_NAME);
   
format(stringsizeof string"%s %s %s"namestringparams);
   
SendClientMessageToAll(-1string);
   return 
1;

Reply
#3

pawn Код:
command(me, playerid, params[])
{
    new
        text[128], name[MAX_PLAYER_NAME];
       
    if(!IsPlayerConnected(playerid)) return 1;
    if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, -1, "USAGE: /me [action]");
   
    GetPlayerName(playerid, name, sizeof name);
    format(text, sizeof text, "* %s %s ", name, text);
    SendActionMessage(playerid, -1, text);
    return 1;
}

SendActionMessage(playerid, color, text[])
{
    new
        Float:range = 5.0, Float:X, Float:Y, Float:Z;
       
    GetPlayerPos(playerid, X, Y, Z);
    for(new i, j = GetPlayerPoolSize(); i <= j; i++)
    {
        if(IsPlayerInRangeOfPoint(i, range, X, Y, Z))
        {
            SendClientMessage(i, color, text);
        }
    }
    return 1;
}
Reply
#4

Use the code of @owit if you want to have it for players in range of the player. My code is for the whole server
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)