Jump to content

Need code fix please


AjaxFTW

Recommended Posts

local hijackT = { 
    {1219.830078125, -1424.0595703125, 13.304864883423, 0, 0, 89.361419677734}, 
    {1249.0126953125, -1257.7177734375, 13.140056610107, 0, 0, 273.76425170898}, 
    {1421.8447265625, -1298.923828125, 13.5546875, 0, 0, 178.47839355469}, 
    {1519.55859375, -1464.7626953125, 9.5, 0, 0, 180.64819335938}, 
    {1785.525390625, -1247.564453125, 13.78784942627, 0, 0, 180.88441467285}, 
    {1268.341796875, -900.681640625, 42.8828125, 0, 0, 179.04418945313}, 
    {2716.43359375, -1846.7705078125, 9.527813911438, 0, 0, 157.59301757813}, 
    {1973.1953125, -1222.4453125, 20.0234375, 0, 0, 93.596710205078}, 
    {1683.5693359375, -2248.5478515625, -2.6734189987183, 0, 0, 88.921936035156}, 
    {-2114.8369140625, -2410.1806640625, 31.281492233276, 0, 0, 317.65530395508}, 
    {2379.2939453125, 75.5146484375, 27.221626281738, 0, 0, 271.45159912109}, 
    {-1006.03515625, -643.421875, 32.0078125, 0, 0, 90.174407958984}, 
    {343.966796875, -1810.021484375, 4.4992127418518, 0, 0, 0.94760131835938}, 
    {2792.1806640625, -1429.37890625, 36.09375, 0, 0, 268.15014648438}, 
} 
  
local hijackCar = { 
    {402}, 
    {429}, 
    {415}, 
    {541}, 
    {475}, 
    {557}, 
    {568}, 
    {480}, 
    {587}, 
    {565}, 
    {602}, 
    {451}, 
    {477}, 
} 
  
local hijackDT = { 
    {2790.3515625, -2456.5908203125, 12.633037567139}, 
    {-2535.45703125, -603.28125, 131.562}, 
    {-1947.033203125, 1384.6689453125, 6.1842346191406}, 
    {-309.84765625, 1531.3017578125, 74.359375}, 
    {-1979.05078125, 433.1484375, 24.684421539307}, 
    {2804.23828125, -1429.646484375, 39.05331802368}, 
    {-2245.462890625, 2371.8662109375, 3.996054649353}, 
    {-2088.697265625, -2334.876953125, 29.625}, 
    {-2754.69140625, 374.138671875, 3.339025497436}, 
    {1245.85546875, -2027.7939453125, 58.830238342285}, 
    {-1407.2783203125, -312.3896484375, 12.992641448975}, 
} 
  
function startHijackTable() 
    if (exports.CORteams:isPlayerInTeams(source, "Staff")) then 
    else 
    if (exports.CORteams:isPlayerInTeams(source, "Criminals")) then return end 
    random = math.random(#hijackT) 
    model = math.random (#hijackCar) 
    x, y, z, rx, ry, rz = hijackT[random][1], hijackT[random][2], hijackT[random][3], hijackT[random][4], hijackT[random][5], hijackT[random][6] 
    hijackStart = createVehicle ( hijackCar[model][1], x,y,z,rx,ry,rz ) 
    setVehicleDamageProof ( hijackStart, true ) 
    x1, y1, z1 = getElementPosition ( hijackStart ) 
    hijackBlip1 = createBlipAttachedTo (hijackStart, 53) 
    setBlipVisibleDistance ( hijackBlip1, 12000000 ) 
    exports.CORtexts:output ( "Hijack has been requested and placed on your map get it first!", root, 255, 0, 0, true ) 
end 
end 
setTimer(startHijackTable, 50, 1) 
  

What's wrong with that code?!

the vehicle get damage as i made damage proof true!!

Help please!!

Link to comment
local hijackT = { 
    {1219.830078125, -1424.0595703125, 13.304864883423, 0, 0, 89.361419677734}, 
    {1249.0126953125, -1257.7177734375, 13.140056610107, 0, 0, 273.76425170898}, 
    {1421.8447265625, -1298.923828125, 13.5546875, 0, 0, 178.47839355469}, 
    {1519.55859375, -1464.7626953125, 9.5, 0, 0, 180.64819335938}, 
    {1785.525390625, -1247.564453125, 13.78784942627, 0, 0, 180.88441467285}, 
    {1268.341796875, -900.681640625, 42.8828125, 0, 0, 179.04418945313}, 
    {2716.43359375, -1846.7705078125, 9.527813911438, 0, 0, 157.59301757813}, 
    {1973.1953125, -1222.4453125, 20.0234375, 0, 0, 93.596710205078}, 
    {1683.5693359375, -2248.5478515625, -2.6734189987183, 0, 0, 88.921936035156}, 
    {-2114.8369140625, -2410.1806640625, 31.281492233276, 0, 0, 317.65530395508}, 
    {2379.2939453125, 75.5146484375, 27.221626281738, 0, 0, 271.45159912109}, 
    {-1006.03515625, -643.421875, 32.0078125, 0, 0, 90.174407958984}, 
    {343.966796875, -1810.021484375, 4.4992127418518, 0, 0, 0.94760131835938}, 
    {2792.1806640625, -1429.37890625, 36.09375, 0, 0, 268.15014648438}, 
} 
  
local hijackCar = { 
    {402}, 
    {429}, 
    {415}, 
    {541}, 
    {475}, 
    {557}, 
    {568}, 
    {480}, 
    {587}, 
    {565}, 
    {602}, 
    {451}, 
    {477}, 
} 
  
local hijackDT = { 
    {2790.3515625, -2456.5908203125, 12.633037567139}, 
    {-2535.45703125, -603.28125, 131.562}, 
    {-1947.033203125, 1384.6689453125, 6.1842346191406}, 
    {-309.84765625, 1531.3017578125, 74.359375}, 
    {-1979.05078125, 433.1484375, 24.684421539307}, 
    {2804.23828125, -1429.646484375, 39.05331802368}, 
    {-2245.462890625, 2371.8662109375, 3.996054649353}, 
    {-2088.697265625, -2334.876953125, 29.625}, 
    {-2754.69140625, 374.138671875, 3.339025497436}, 
    {1245.85546875, -2027.7939453125, 58.830238342285}, 
    {-1407.2783203125, -312.3896484375, 12.992641448975}, 
} 
  
function startHijackTable() 
    if (exports.CORteams:isPlayerInTeams(source, "Staff")) then 
    random = math.random(#hijackT) 
    model = math.random (#hijackCar) 
    x, y, z, rx, ry, rz = hijackT[random][1], hijackT[random][2], hijackT[random][3], hijackT[random][4], hijackT[random][5], hijackT[random][6] 
    hijackStart = createVehicle ( hijackCar[model][1], x,y,z,rx,ry,rz ) 
    setVehicleDamageProof ( hijackStart, true ) 
    x1, y1, z1 = getElementPosition ( hijackStart ) 
    hijackBlip1 = createBlipAttachedTo (hijackStart, 53) 
    setBlipVisibleDistance ( hijackBlip1, 12000000 ) 
    exports.CORtexts:output ( "Hijack has been requested and placed on your map get it first!", root, 255, 0, 0, true ) 
    end 
end 
setTimer(startHijackTable, 50, 1) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...