30.10.2014, 19:19
Try that
PHP код:
CMD:whisper(playerid,params[]) {
new string[256];
new filestring[75];
new pname[MAX_PLAYER_NAME];
new targetid;
GetPlayerName(playerid,pname,sizeof(pname));
for(new i=0;i<MAX_PLAYERS;i++) {
if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10) {
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x,y,z);
if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
format(string, sizeof(string), "[WHISPER] %s[%d]: %s",pname,playerid,params);
SendClientMessage(i,red,string);
format(filestring, sizeof filestring, "[WHISPER] %s[%d]: %s", pname,playerid,params);}}
return 1;}