Little help
#9

Hmmm...Why using ProxDetector for /me command?? When you can use NearByMessage function
And I suggest you to use ZCMD.

pawn Код:
COMMAND:me(playerid, params[])
{
    new string[128], MText[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(!sscanf(params, "s[128]",MText))
    {
        format(string, sizeof(string), "** %s %s", name, params[0]);
        NearByMessage(playerid, 0xBC43B9FF, string);
    }
    else return SendClientMessage(playerid, COLOR_WHITE, "[INFO]: /me [Action]");
    return 1;
}
Function:
pawn Код:
forward NearByMessage(playerid, colour, string[]);
public NearByMessage( playerid, colour, string[])
{
    new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnectedEx( i ) && IsPlayerSpawned( playerid ) )
        {
            GetPlayerPos( playerid, PlayerX, PlayerY, PlayerZ);
            if(IsPlayerInRangeOfPoint(i, 12, PlayerX, PlayerY, PlayerZ) )
            {
                if(GetPlayerVirtualWorld( playerid ) == GetPlayerVirtualWorld( i ) && GetPlayerInterior( playerid ) == GetPlayerInterior( i ) )
                {
                    SendClientMessage(i, colour, string);
                }
            }
        }
    }
    return true;
}
Reply


Messages In This Thread
Little help - by Anzhelov - 01.02.2011, 16:36
Re: Little help - by Marricio - 01.02.2011, 16:39
Re: Little help - by Anzhelov - 01.02.2011, 16:55
Re: Little help - by Marricio - 01.02.2011, 16:56
Re: Little help - by Anzhelov - 01.02.2011, 16:57
Re: Little help - by Marricio - 01.02.2011, 17:02
Re: Little help - by Anzhelov - 01.02.2011, 17:04
Re: Little help - by Marricio - 01.02.2011, 17:11
Re: Little help - by xRyder - 01.02.2011, 17:17
Re: Little help - by Anzhelov - 01.02.2011, 17:26
Re: Little help - by Marricio - 01.02.2011, 18:57
Re: Little help - by Anzhelov - 01.02.2011, 19:24
Re: Little help - by Marricio - 01.02.2011, 19:32
Re: Little help - by Anzhelov - 01.02.2011, 19:43
Re: Little help - by Marricio - 01.02.2011, 19:48
Re: Little help - by Anzhelov - 01.02.2011, 20:01
Re: Little help - by Marricio - 01.02.2011, 20:25
Re: Little help - by Anzhelov - 01.02.2011, 20:30
Re: Little help - by Anzhelov - 02.02.2011, 06:45
Re: Little help - by Steven Paul - 02.02.2011, 09:39

Forum Jump:


Users browsing this thread: 2 Guest(s)