How to add a /me to a command
#4

pawn Код:
CMD:me(playerid,params[])
{
    if(!strlen(params)) return SendClientMessage(playerid, red, "Usage: /me [text]");
    new string[128], name[24], Float:x, Float:y, Float:z;
    GetPlayerName(playerid,name,24);
    GetPlayerPos(playerid,x,y,z);
    format(string,128,"%s %s",name,params);
    foreach(Player, i)
    {
        if(IsPlayerInRangeOfPoint(i, 10, x, y, z))
        {
            SendClientMessage(i,red, string);
        }
    }
    return 1;
}
If a player is within 10 units of playerid, he will see the string.
Use zcmd and foreach
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: 1 Guest(s)