30.10.2014, 19:09
Hello
I want to set the range of the players on this whisper cmd
as you could see it is set to be GetDistanceBetweenPlayers(playerid,i) < 10 but i want the players to set their range, how could it be done?
I want to set the range of the players on this whisper cmd
pawn Код:
CMD:whisper(playerid,params[]) {
new string[256];
new filestring[75];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
for(new i=0;i<MAX_PLAYERS;i++) {
if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10) {
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;}