12.03.2015, 12:22
Well, yeah you should use IsPlayerInRangeOfPoint
You can youse this function:
Greekz
Quote:
and I have to know what is the best way to check if the player is in a given range to see another player's sent message
|
Код:
stock SendRangeMessage(playerid,color,Float:range,const string[]) { new Float:p[3],i; GetPlayerPos(playerid,p[0],p[1],p[2]); for(;i<MAX_PLAYERS; i++) if(IsPlayerInRangeOfPoint(i,range,p[0],p[1],p[2])) SendClientMessage(i,color,string); return 1; } //Example: SendRangeMessage(playerid,-1,15.0,"Hallo"); //Sends a Message to all players in a range of 15.0