[ayuda] ProxDetectorS - Facil
#1

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?
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)