Posts: 22
Threads: 5
Joined: Nov 2013
Quote:
Originally Posted by iFiras
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; }
|
Use what he say ^