Niouro
Nuevo miembro
- Mensajes
- 1
- Puntuación de reacción
- 0
¿Hay alguna forma de detectar un CheckPoint creado por el servidor y obtener sus coordenadas? Lo he intentado, pero no lo logré. ¡Necesito ayuda!
Me equivoque de tema, solo le di a preguntas y me mando a Pawn.
Me equivoque de tema, solo le di a preguntas y me mando a Pawn.
Codigo:
local e = require 'lib.samp.events'
local f = renderCreateFont("Arial", 10, 5)
local a = nil
local b = false
local c = false
function main()
while not isSampAvailable() do wait(500) end
sampAddChatMessage("{FFFFFF}Cargado", -1)
while true do wait(0)
if b and a then
local x, y, z = getCharCoordinates(PLAYER_PED)
local d = getDistanceBetweenCoords3d(x, y, z, a.x, a.y, a.z)
if d <= 200 then
local sx, sy = convert3DCoordsToScreen(a.x, a.y, a.z + 1.2)
if sx and sy then
renderFontDrawText(f, "CheckPoint", sx, sy, 0xFFFF0000)
end
end
if d <= 2 and not c then
sampAddChatMessage("{FFFFFF}Test", -1)
c = true
end
end
end
end
function e.onSetCheckpoint(p)
a = p
b = true
c = false
end
function e.onDisableCheckpoint()
b = false
a = nil
c = false
end
Última edición: