22.09.2013, 02:39
i used original npc function(SA:MP function) not fcnpc,rnpc,xnpc..etc
problem is npc perceive wall
but, not perceive ceiling when using 'MapAndreas' Function.
however, wall have been still perceive.
Please tell me
solve this problem.
The red clolor is mapandreas
problem is npc perceive wall
but, not perceive ceiling when using 'MapAndreas' Function.
however, wall have been still perceive.
Please tell me
solve this problem.
Код:
stock GetClosestPlayerE(playerid, bool:ignorance=false) { new closestplayer = -1; new Float:closestdist = 999999; new Float:x, Float:y, Float:z, Float:zMap,Float:xMap,Float:yMap; for(new p=0; p<MAX_PLAYERS; p++) { if(p != playerid && IsPlayerConnected(p) && !IsPlayerZombie(p)) { if(ignorance == false) { GetPlayerPos(p, x,y,z); MapAndreas_FindZ_For2DCoord(x,y,zMap); if(zMap > z || IsSafeZone(p) || CampingPlayers(p)) continue; } new Float:dist = GetDistanceBetweenPlayersE(playerid,p); if(dist < closestdist) { closestdist = dist; closestplayer = p; } } } return closestplayer; }