SA-MP Forums Archive
[ayuda] ProxDetectorS - Facil - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [ayuda] ProxDetectorS - Facil (/showthread.php?tid=622596)



[ayuda] ProxDetectorS - Facil - Doniczzz - 24.11.2016

Mi pregunta es como hacer para que al momento de llamar una callback se utilice el proxdetectorS y le mande un mensaje al usuario mas cercano?

Ejemplo:

Код:
CALLBACK: Prueba1(playerid)
{
	new jNombre = INVALID_PLAYER_ID;
    if(ProxDetectorS(3,playerid,jNombre))
		{
            Mensaje(jNombre,-1,"Mensaje jugador cercano.");
		}
    Mensaje(playerid, -1, "Se llamу al callback");
	return 1;
}
Lo he hecho asн y me manda el mensaje "Se llamу al callback" pero no le envia el mensaje al jugador cercano "Mensaje jugador cercano." їQue estoy haciendo mal?


Re: [ayuda] ProxDetectorS - Facil - Unrea1 - 24.11.2016

Para comprobar si hay jugadores cercanos:

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

Extraes la posiciуn de todos los jugadores, asн comprobando si el jugador o los jugadores estбn cerca mutuamente, y ahн mandas el mensaje.

Para " llamar a todos los jugadores "

https://sampwiki.blast.hk/wiki/GetPlayerPoolSize

Aunque te recomendarнa usar foreach: https://sampforum.blast.hk/showthread.php?tid=570868