19.03.2012, 12:00
Use this:
And like the man said above me, include de foreach function that you can find somewhere on the forum.
And like the man said above me, include de foreach function that you can find somewhere on the forum.
Код:
stock ProxDetector(Float:radi, playerid, string[],color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if(!IsPlayerConnected(i))continue; if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) SendClientMessage(i,color,string); } } stock GetName(playerid) { new string[MAX_PLAYER_NAME]; GetPlayerName(playerid,string,sizeof(string)); strreplace(string,'_',' '); return string; } public OnPlayerText(playerid, text[]) { new str[128]; format(string,sizeof(string),"%s says: %s",GetName(playerid),text; ProxDetector(30.0, playerid, str, COLOR_WHITE); return 0; }