script_name("FenixZone_Camionero_GetCar")
script_author("OosKar")
script_properties("force-reloading-only")
require("lib.sampfuncs")
require("lib.moonloader")
slot0 = require("lib.samp.events")
slot1 = false
slot2 = renderCreateFont("Arial", 15, 1)
slot3 = renderCreateFont("Arial", 15, 1)
slot4, slot5 = getScreenResolution()
slot6 = VK_P
slot7 = VK_O
slot8 = false
slot9 = false
slot10 = {
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
214,
215,
216
}
slot11 = {
{
z = -0.7303,
x = -1484.1152,
y = 198.1608
},
{
z = 3.5547,
x = -1753.8304,
y = -103.2657
}
}
slot12 = {}
slot13 = {}
slot14 = true
slot15 = true
slot16 = 19605
slot17 = 19606
slot18 = {
{
z = 3.5495,
x = -1565.5137,
y = 131.1742
},
{
z = 3.5495,
x = -1569.5247,
y = 126.9932
},
{
z = 3.5495,
x = -1572.9672,
y = 123.3047
},
{
z = 3.5495,
x = -1576.6602,
y = 119.5219
},
{
z = 3.5495,
x = -1580.3402,
y = 115.6672
},
{
z = 3.5495,
x = -1583.9503,
y = 112.1327
},
{
z = 3.5495,
x = -1587.6101,
y = 108.4289
},
{
z = 3.5495,
x = -1591.087,
y = 104.9814
},
{
z = 3.5495,
x = -1594.9756,
y = 101.0067
},
{
z = 3.5495,
x = -1598.4352,
y = 97.5544
},
{
z = 3.5495,
x = -1602.3594,
y = 93.5898
},
{
z = 3.5495,
x = -1605.7723,
y = 90.2074
},
{
z = 3.5495,
x = -1609.5233,
y = 86.4442
},
{
z = 3.5495,
x = -1612.9783,
y = 82.9174
},
{
z = 3.5495,
x = -1616.967,
y = 79.4305
},
{
z = 3.5495,
x = -1620.9895,
y = 75.6724
}
}
slot19 = {}
slot20 = 1
slot21 = 0
slot22 = false
slot23 = false
slot24 = false
slot25 = false
slot26 = false
slot27 = false
slot28 = false
slot29 = false
slot30 = nil
slot31 = false
slot32 = 0
slot33 = 0
slot34 = 0
function getCarsInRadio()
for slot3 = 1, 16 do
slot4, slot5 = sampGetCarHandleBySampVehicleId(uv0[slot3])
if slot4 and isCarEngineOn(slot5) then
uv1 = false
if checkValues(uv2, slot3) then
uv1 = true
deleteObject(uv3[slot3])
end
if checkValues(uv4, slot3) then
uv1 = true
end
if not uv1 then
if not uv5 then
uv1 = false
if checkValues(uv2, slot3) or checkValues(uv4, slot3) then
uv1 = true
end
if not uv1 then
table.insert(uv4, uv0[slot3])
if getCarModel(slot5) == 609 then
uv3[slot3] = createObject(uv6, uv7[slot3].x, uv7[slot3].y, uv7[slot3].z)
else
uv3[slot3] = createObject(uv8, uv7[slot3].x, uv7[slot3].y, uv7[slot3].z)
end
else
for slot9, slot10 in ipairs(uv4) do
if uv0[slot3] == slot10 then
table.remove(uv4, slot9)
break
end
end
table.insert(uv2, uv0[slot3])
deleteObject(uv3[slot3])
end
else
table.insert(uv2, uv0[slot3])
end
end
elseif slot4 and isCarInArea2d(slot5, -1564.0728, 132.7107, -1634.0681, 77.3653, false) then
if not uv5 then
uv1 = false
if checkValues(uv2, slot3) then
uv1 = true
deleteObject(uv3[slot3])
end
if not uv1 then
for slot9, slot10 in ipairs(uv4) do
if uv0[slot3] == slot10 then
table.remove(uv4, slot9)
table.insert(uv2, uv0[slot3])
deleteObject(uv3[slot3])
uv1 = true
break
end
end
if not uv1 then
table.insert(uv2, uv0[slot3])
end
end
else
table.insert(uv2, uv0[slot3])
deleteObject(uv3[slot3])
end
elseif not slot4 then
for slot9, slot10 in ipairs(uv2) do
if uv0[slot3] == slot10 then
table.remove(uv2, slot9)
deleteObject(uv3[slot3])
break
end
end
for slot9, slot10 in ipairs(uv4) do
if uv0[slot3] == slot10 then
table.remove(uv4, slot9)
deleteObject(uv3[slot3])
break
end
end
end
end
uv5 = false
end
function checkValues(slot0, slot1)
for slot5, slot6 in ipairs(slot0) do
if uv0[slot1] == slot6 then
return true
end
end
return false
end
function checkValidCar(slot0)
if isCharInAnyCar(PLAYER_PED) then
for slot4, slot5 in ipairs(uv0) do
if slot0 == slot5 then
return true
end
end
return false
end
end
function slot0.onSetVehicleVelocity(slot0, slot1)
end
function slot0.onVehicleStreamOut(slot0)
if isCharInAnyCar(PLAYER_PED) and checkValidCar(slot0) and uv0 and uv1 then
slot1, slot2 = sampGetVehicleIdByCarHandle(storeCarCharIsInNoSave(PLAYER_PED))
if slot0 == slot2 then
sampAddChatMessage(string.format("Posicion: %d", slot0), -1)
uv2 = true
uv3 = slot0
return false
end
end
end
function slot0.onTogglePlayerControllable(slot0)
if isCharInAnyCar(PLAYER_PED) and uv0 then
slot1, slot2 = sampGetVehicleIdByCarHandle(storeCarCharIsInNoSave(PLAYER_PED))
if checkValidCar(slot2) then
return false
end
end
end
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then
return
end
while not isSampAvailable() do
wait(100)
end
sampAddChatMessage("| Camionero FZ-Cheats by OosKar MusiK |", 4294902015.0)
slot0 = sampGetCurrentServerName()
while not uv0 do
wait(100)
if string.find(sampGetCurrentServerName(), "FZ Roleplay") ~= nil then
uv0 = true
end
end
if uv0 then
while true do
wait(0)
if uv1 and isCharInAnyCar(PLAYER_PED) and (isKeyJustPressed(VK_F) or isKeyJustPressed(VK_RETURN)) and not sampIsCursorActive() and not uv2 then
uv2 = true
uv3 = localClock()
if uv4 then
uv4 = false
deleteObject(uv5)
end
wait(300)
end
if uv6 then
for slot4, slot5 in ipairs(uv7) do
if slot5 == uv8 then
uv5 = createObject(19607, uv9[slot4].x, uv9[slot4].y, uv9[slot4].z)
uv6 = false
uv4 = true
break
end
end
end
if isCharGettingInToACar(PLAYER_PED) and not uv10 and uv1 then
uv10 = true
uv1 = false
sampAddChatMessage("No perder Camion: Desactivado", -1)
elseif not isCharGettingInToACar(PLAYER_PED) then
uv10 = false
end
if isCharSittingInAnyCar(PLAYER_PED) or isCharGettingInToACar(PLAYER_PED) or localClock() - uv3 > 5 then
uv2 = false
end
if uv2 and isCharOnFoot(PLAYER_PED) then
setGameKeyState(15, 255)
end
if isCharOnFoot(PLAYER_PED) then
uv11 = false
end
if isCharInAnyCar(PLAYER_PED) and not isCarEngineOn(storeCarCharIsInNoSave(PLAYER_PED)) then
slot1, slot2 = sampGetVehicleIdByCarHandle(storeCarCharIsInNoSave(PLAYER_PED))
if checkValidCar(slot2) then
if not uv11 then
sampSendChat("/y encendio el motor de su vehiculo.")
if isCharInArea2d(PLAYER_PED, uv12[1].x, uv12[1].y, uv12[2].x, uv12[2].y, false) then
wait(600)
sampSendChat("/cargar camion")
end
uv11 = true
end
setCarEngineOn(storeCarCharIsInNoSave(PLAYER_PED), true)
end
end
if isCharInAnyCar(PLAYER_PED) and uv13 then
slot1, slot2 = sampGetVehicleIdByCarHandle(storeCarCharIsInNoSave(PLAYER_PED))
if checkValidCar(slot2) then
uv13 = false
sampAddChatMessage("Cheat Camionero Desactivado", -1)
for slot6 = 1, 16 do
deleteObject(uv14[slot6])
end
end
end
if isKeyJustPressed(uv15) and isCharInAnyCar(PLAYER_PED) and not sampIsCursorActive() and isCharInArea2d(PLAYER_PED, uv12[1].x, uv12[1].y, uv12[2].x, uv12[2].y, false) then
uv1 = not uv1
if uv1 then
sampAddChatMessage("No perder Camion: Activado", -1)
else
sampAddChatMessage("No perder Camion: Desactivado", -1)
end
end
if not isCharInArea2d(PLAYER_PED, uv12[1].x, uv12[1].y, uv12[2].x, uv12[2].y, false) and uv1 then
sampAddChatMessage("No perder Camion: Desactivado", -1)
uv1 = false
end
if not isCharInArea2d(PLAYER_PED, uv12[1].x, uv12[1].y, uv12[2].x, uv12[2].y, false) and not uv16 and uv13 then
uv16 = true
sampAddChatMessage("Cheat Camionero Desactivado", -1)
for slot4 = 1, 16 do
deleteObject(uv14[slot4])
end
uv13 = false
end
if isCharInAnyCar(PLAYER_PED) then
uv17 = true
else
uv17 = false
end
if isKeyJustPressed(uv18) and not sampIsCursorActive() and isCharInArea2d(PLAYER_PED, uv12[1].x, uv12[1].y, uv12[2].x, uv12[2].y, false) then
uv13 = not uv13
uv16 = false
if uv13 then
sampAddChatMessage("Cheat Camionero Activado", -1)
uv19 = true
slot1 = createObject(uv20, 0, 0, 0)
uv14 = {
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1,
slot1
}
inVehiclesTrunkInArea = {}
outVehiclesTrunkInArea = {}
else
sampAddChatMessage("Cheat Camionero Desactivado", -1)
for slot4 = 1, 16 do
deleteObject(uv14[slot4])
end
end
end
if uv13 then
getCarsInRadio()
end
end
end
end