script_name("TP to marker for Arizona RP")
script_description("Teleports you to the marker without a kick")
script_version_number(3)
script_version("1.2")
script_author("RollUp")
require 'lib.sampfuncs'
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do
wait(200)
end
sampRegisterChatCommand("j", atp)
while true do
wait(0)
if tpres then
coords, posX, posY, posZ = getTargetBlipCoordinates()
z = getGroundZFor3dCoord(posX, posY, posZ)
car = storeCarCharIsInNoSave(playerPed)
if coords and isCharInCar(playerPed, car) then
sampSendSpawn()
setCharCoordinates(playerPed, posX, posY, posZ)
wait(200)
tpres = false
elseif coords then
sampSendSpawn()
setCharCoordinates(playerPed,-2467.99, 2278.16, 4.52 0 , -1543.92, 2627.95, 55.42 0, z+2.5)
tpres = false
else sampAddChatMessage('[TP for Arizona RP]: Поставьте метку на карте для телепорта.', 0x00FFAA00)
tpres = false
end
end
end
end
function onSendPacket(id)
if id == PACKET_VEHICLE_SYNC and tpres then
return false
end
end
function atp()
tpres = true
end