/W ? fails
#2

Quote:
Originally Posted by Mean
View Post
pawn Code:
CMD:w(playerid,params[])
    {
        new string[128], Player[MAX_PLAYER_NAME];
        new Float:x, Float:y, Float:z;
        GetPlayerName(playerid, Player, MAX_PLAYER_NAME);
        GetPlayerPos(playerid, x, y, z);
        format(string, 128, "[WHISPER] %s: %s", Player, params);
        for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerInRangeOfPoint(playerid, 15.0, x, y, z)) SendClientMessage(i, COLOR_WHITE, string);
        return 1;
    }
Everyone can hear this, not only the player that is in range of 15
In the for-loop you once mixed up 'i' and 'playerid' when checking the range.
Reply


Messages In This Thread
/W ? fails - by Mean - 07.11.2010, 15:44
Re: /W ? fails - by DeathOnaStick - 07.11.2010, 15:46
Re: /W ? fails - by Mean - 07.11.2010, 15:47
Re: /W ? fails - by willsuckformoney - 07.11.2010, 15:59
Re: /W ? fails - by Mean - 07.11.2010, 16:13

Forum Jump:


Users browsing this thread: 1 Guest(s)