Closer chat for RP. + REP.
#4

Use GetDistanceBetweenPlayers
It's easy, try this command for example
pawn Код:
CMD:w(playerid,params[])
{
    new string[128];
    if(!strlen(params))
    {
        SendClientMessage(playerid,-1,"[USAGE] {FFFFFF}/w [MESSAGE]");
        return 1;
    }
    format(string, sizeof(string), "<Whisper>: %s(%d): %s",PlayerName(playerid),playerid,params);
    printf("%s", string);
    IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string);
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10)
        {
            format(string, sizeof(string), "<Whisper> %s(%d): {FFFFFF}%s",PlayerName(playerid),playerid,params);
            SendClientMessage(i,-1,string);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Closer chat for RP. + REP. - by DemME - 20.12.2013, 19:11
Re: Closer chat for RP. + REP. - by Zamora - 20.12.2013, 19:21
Re: Closer chat for RP. + REP. - by DemME - 20.12.2013, 19:50
Re: Closer chat for RP. + REP. - by iFiras - 20.12.2013, 19:53
Re: Closer chat for RP. + REP. - by Zamora - 20.12.2013, 19:53
Re: Closer chat for RP. + REP. - by DemME - 20.12.2013, 19:56
Re: Closer chat for RP. + REP. - by Mitchy - 20.12.2013, 19:57
Re: Closer chat for RP. + REP. - by Zamora - 20.12.2013, 20:10
Re: Closer chat for RP. + REP. - by FakkChass - 20.12.2013, 20:31
Re: Closer chat for RP. + REP. - by DemME - 20.12.2013, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)