Range of this cmd
#1

Hello
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;}
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?
Reply


Messages In This Thread
Range of this cmd - by Bondage - 30.10.2014, 19:09
Re: Range of this cmd - by nemesis- - 30.10.2014, 19:17
Re: Range of this cmd - by Glossy42O - 30.10.2014, 19:19
Re: Range of this cmd - by Bondage - 30.10.2014, 21:47
Re: Range of this cmd - by mkmk - 30.10.2014, 22:38
Re: Range of this cmd - by BornHuman - 30.10.2014, 23:27
Re: Range of this cmd - by Abagail - 30.10.2014, 23:43
Re: Range of this cmd - by Bondage - 31.10.2014, 07:04
Re: Range of this cmd - by DanishHaq - 31.10.2014, 07:13

Forum Jump:


Users browsing this thread: 2 Guest(s)