-
Posts
24 -
Joined
-
Last visited
Details
-
Gang
None
-
Location
Philippines, Davao City
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Shania's Achievements
Civilian (7/54)
2
Reputation
-
How to remove Default DayZ Scoreboard?
-
Loki can you add something that players cant shoot/kill inside the cinema.
-
Shania changed their profile photo
-
We are searching PRO MAPPER if you are interested contact us in www.facebook.com/WWZDayZ
-
function makeTargetFollow ( target ) if ( target ) and ( getElementType(target) == "player" ) then local x,y,z = getElementPosition( source ) local tx,ty,tz = getElementPosition( target ) if ( getDistanceBetweenPoints3D( x,y,z,tx,ty,tz ) <= 7 ) then toggleAllControls( target, false ) setControlState( target, "forwards", true) setTimer( updateRotation, 500, 0, source, target ) end end end addEventHandler( "onPlayerTarget", root, makeTargetFollow ) function updateRotation( player, target ) if ( isElement(player) ) and ( isElement(target) ) then local x,y = getElementPosition( player ) local tx,ty = getElementPosition( target ) local rot = findRotation(tx,ty,x,y) setElementRotation ( target, 0, 0, rot ) end end function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end
-
Tell me what is wrong with it
-
Script that can see teammates blood,name,on foot & Meters. also aduty with "PNG" that write Admin On Duty [NO DM]
-
All cars is not spawning. What should i do now?
-
-- Police Maverick hunterSpawns = { {-1185.9775390625,26.4111328125,14.1484375}, {-1724.5830078125,2559.3544921875,104.09127807617}, {615.744140625,850.1572265625,-43.009014129639}, {232.5283203125,1950.3583984375,17.640625}, {-1050.5859375,1968.033203125,120.66523742676}, {2821.03515625,2809.6689453125,10.8203125}, {1949.9912109375,-2631.44140625,13.546875}, {-756.53979492188,-2137.5471191406,26.463499069214}, } pickupSpawns = { {-2479.6240234375,2223.6669921875,4.84375}, {-92.9951171875,2823.0908203125,76.721649169922}, {-2448.99609375,-1335.8662109375,310.97662353516}, {-173.2470703125,-2635.5341796875,26.608192443848}, {2108.447265625,-1600.916015625,13.552597045898}, {2452.7392578125,1607.9833984375,10.8203125}, {-1800.8984375,-1950.9736328125,93.561332702637}, } patriotSpawns = { {-1473.5791015625,320.2294921875,7.1875}, {-1373.998046875,460.62109375,7.1875}, {419.150390625,2186.087890625,39.499450683594}, {2821.1796875,793.4658203125,10.8984375}, {-3068.7145996094, 1100.0603027344, 34.596874237061}, } sanchezSpanws = { {-812.470703125,-2629.912109375,90.105056762695}, {-1729.8525390625,-1940.3154296875,99.840209960938}, {-2130.90234375,178.4375,35.257678985596}, {-2656.7333984375,1352.4873046875,7.0596733093262}, {-1598.302734375,2694.947265625,55.07092666626}, {2920.38671875,2486.0087890625,10.8203125}, {505.732421875,-291.8681640625,20.00952911377}, {-428.8828125,-694.8310546875,19.14847946167}, {1190.41015625,-2109.0341796875,64.738548278809}, {1658.9716796875,-1069.0224609375,23.906229019165}, } barracksSpawns = { {86.486328125,1950.9013671875,17.846803665161}, {440.185546875,1464.173828125,6.3338670730591}, } coachSpawns = { {-1971.4619140625,97.4658203125,27.6875}, {1735.8720703125,1429.0693359375,10.797702789307}, {2797.1318359375,-1868.8359375,9.8603811264038}, {1941.900390625,1975.1904296875,7.59375}, } SchlauchBootSpawns = { {2463.3984375,-2719.638671875,-0.55000001192093}, {-1577.4873046875,182.353515625,-0.53995263576508}, {-806.80859375,2233.7001953125,40.049976348877}, {-127.4453125,-779.6923828125,-0.55000001192093}, } quadSpawns = { {-1418.4000244141,-1503.6999511719,101.19999694824}, {-1435.6999511719,-966.79998779297,200.60000610352}, {-1512.0999755859,1973.1999511719,48}, {861.70001220703,-15.60000038147,62.799999237061}, } maverikSpawns = { {-1495.888671875,-2691.40234375,57.325229644775}, {-2688.42578125,1471.634765625,7.1875}, {2221.8583984375,-1344.396484375,23.984273910522}, {-3348.83203125, 995.96057128906, 31.096874237061}, } dodoSpawnPoints = { {1889.29333,-2628.57715,13.93999}, {1277.15308,1361.72290,11.20747}, {-1397.73022,-627.19580,14.53984}, } tentSpawns = { {-2845.060546875,2761.2509765625,242.69204711914}, {-1095.94921875,-1450.958984375,126.92543029785}, {2607.1357421875,-510.4755859375,80.744903564453}, {-1509.2333984375,-1986.443359375,50.071846008301}, } heliCrashSites = { {-1360.0478515625,-1070.7314453125,160.4069519043}, {-421.4619140625,-1284.4345703125,33.740924835205}, {-2357.654296875,-1634.3623046875,483.703125}, {979.0849609375,160.59375,28.935249328613}, {-2057.2294921875,2781.73828125,163.12780761719}, {826.90234375,2803.6259765625,74.863929748535}, {2577.7060546875,-650.541015625,136.37449645996}, } policecarSpawns = {-- Police Cars Spawnen NUR in PD Tiefgaragen. (LS/SF) {1529.6999511719,-1687.8000488281,5.8000001907349}, {1544.0999755859,-1676.8000488281,5.8000001907349}, {-1622.5,654.40002441406,-5.4000000953674}, {-1638.3000488281,654.09997558594,-5.4000000953674}, } -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- --------------------------[new cars]-------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- supergteSpawns = { {1352.8176269531 ,-618.27368164063 ,109.1328125}, {-1793.6282958984 ,545.84197998047 ,35.1640625}, {-2077.8044433594 ,1353.4530029297 ,7.1015625}, {-2655.2348632813 ,-330.06393432617 ,6.6237382888794}, {2229.2077636719 ,2041.7307128906 ,10.8203125}, {2841.3979492188 ,2381.7604980469 ,10.8203125}, } -------------------------------------------------------------- ElegantSpawns = { {1349.0495605469 ,2799.8466796875 ,10.619296073914}, {-535.39141845703 ,-131.55358886719 ,70.610092163086}, {1180.0578613281 ,-1852.8994140625 ,13.3984375}, {1796.0054931641 ,-1917.2692871094 ,13.393900871277}, {328.29574584961 ,-1799.5350341797 ,4.6788959503174}, } -------------------------------------------------------------- YosemiteSpawns = { {1204.8188476563 ,-880.38311767578 ,42.935794830322}, {589.23303222656 ,1645.8383789063 ,6.9921875}, {2123.9946289063 ,2503.8623046875 ,10.8203125}, {2594.5622558594 ,1826.6097412109 ,10.8203125}, } ------------------------------ ------------------------------ InfernusSpawns = { {2795.0783691406 ,-2541.8161621094 ,13.629325866699}, {421.52807617188 ,-1556.3165283203 ,27.578125}, {1011.1229858398 ,-1449.3216552734 ,13.554634094238}, {2553.3146972656 ,736.55004882813 ,10.8203125}, } -------------------------------------------------------------- MonsterSpawns = { {1665.1051025391 ,992.26867675781 ,10.8203125}, {-179.62503051758 ,721.01226806641 ,25.59623336792}, {-299.46557617188 ,1566.2329101563 ,75.359375}, {2717.8601074219 ,647.51147460938 ,10.817118644714}, } -------------------------------------------------------------- TurismoSpawns = { {1619.3336181641 ,130.9507598877 ,29.964345932007}, {2341.3796386719 ,-28.91650390625 ,26.3359375}, {2676.8859863281 ,-1560.0799560547 ,21.822650909424}, {1538.2397460938 ,-2220.0949707031 ,13.546875}, } BuffaloSpawns = { {1258.5858154297 ,-1825.0596923828 ,13.397802352905}, {1547.5419921875 ,-2351.890625 ,13.546875}, {2111.4423828125 ,1431.5316162109 ,10.8203125}, {1992.2672119141 ,2078.8884277344 ,10.8203125}, } -------------------------------------------------------------- AmbulanceSpawns = { {-301.39840698242 ,1018.2769165039 ,19.59375}, {-2682.2863769531 ,623.64233398438 ,14.453125}, {-1524.7786865234 ,2531.7153320313 ,55.6875}, } -------------------------------------------------------------- SandkingSpawns = { {-315.29193115234 ,-1005.7764282227 ,52.761077880859}, {-1803.6164550781 ,-1920.9705810547 ,92.240730285645}, {-2315.5366210938 ,-2804.5886230469 ,12.001314163208}, } -------------------------------------------------------------- FBITruckSpawns = { {1832.3538818359 ,-1540.2224121094 ,13.3828125}, {1596.5344238281 ,-1678.1207275391 ,5.890625}, {2302.3342285156 ,2484.9555664063 ,3.2734375}, {2257.1999511719 ,2461.6127929688 ,10.8203125}, } -------------------------------------------------------------- BulletSpawns = { {-1597.5969238281 ,667.30560302734 ,7.1875}, {-1739.7442626953 ,107.34017944336 ,3.5546875}, {-1721.5119628906 ,-1216.3265380859 ,53.58642578125}, {66.282180786133 ,-230.21392822266 ,1.5723714828491}, {1689.7591552734 ,-1030.9340820313 ,23.90625}, {1528.5773925781 ,-1970.1634521484 ,21.806758880615}, } -------------------------------------------------------------- SultanSpawns = { {1897.8820800781 ,958.67834472656 ,10.8203125}, {2127.9599609375 ,951.24444580078 ,10.8203125}, {879.40502929688 ,-1660.4870605469 ,13.546875}, {-2499.2856445313 ,1210.8399658203 ,37.428329467773}, {-2126.5395507813 ,-159.41772460938 ,35.3203125}, } -------------------------------------------------------------- TahomaSpawns = { {1043.1104736328 ,-896.44506835938 ,42.554679870605}, } -------------------------------------------------------------- HuntleySpawns = { {-764.13372802734 ,-1692.6893310547 ,97.165283203125}, {-2133.0690917969 ,-2464.8764648438 ,30.46875}, {-76.164039611816 ,-1462.1538085938 ,7.3323926925659}, } -------------------------------------------------------------- StaffordSpawns = { {550.93603515625 ,-1277.7501220703 ,17.248237609863}, {1414.0952148438 ,-2678.5419921875 ,13.375}, } -------------------------------------------------------------- SWATSpawns = { {1593.8159179688 ,-1618.087890625 ,13.39500617981}, {-1597.0938720703 ,663.84692382813 ,7.1875}, } -------------------------------------------------------------- BoxvilleSpawns = { {1800.5343017578 ,332.15591430664 ,19.053895950317}, {1896.7581787109 ,1981.7312011719 ,13.784775733948}, {2048.4565429688 ,2223.2492675781 ,10.8203125}, } -------------------------------------------------------------- NRGSpawns = { {2168.6706542969 ,1789.0966796875 ,10.8203125}, {2160.0998535156 ,1026.9809570313 ,10.8203125}, {285.08676147461 ,-1168.5635986328 ,80.909896850586}, {1941.0543212891 ,-1790.2344970703 ,13.3828125}, } -------------------------------------------------------------- FiretruckSpawns = { {1760.9455566406 ,2070.2214355469 ,10.8203125}, {-2059.5476074219 ,78.032920837402 ,28.390625}, } -------------------------------------------------------------- BurritoSpawns = { {-425.49822998047 ,777.41510009766 ,16.408315658569}, {619.09375 ,2771.2687988281 ,82.007858276367}, {58.981792449951 ,1837.0443115234 ,17.647617340088}, {-292.54547119141 ,1557.3509521484 ,75.359375}, } -------------------------------------------------------------- FBIRancherSpawns = { {1090.1729736328 ,1072.5738525391 ,10.8359375}, {2275.2077636719 ,2058.3693847656 ,10.8359375}, } ------------------------------------------------------ RancherSpawns = { {2889.0305175781 ,2266.2600097656 ,10.8359375}, {-1996.3405761719 ,-1579.2448730469 ,86.198272705078}, {-1449.1791992188 ,-1809.8391113281 ,46.323055267334}, {-587.71783447266 ,-2266.7119140625 ,25.787929534912}, } -------------------------------------------------------------- WayfarerSpawns = { {516.51293945313 ,-942.51257324219 ,78.431846618652}, {1341.5170898438 ,-460.41784667969 ,53.460762023926}, {1789.6905517578 ,69.866249084473 ,33.694458007813}, } -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- policerangerSpawns = {-- Police Ranger Spawnen NUR in der LVPD Garage {2242.8999023438,2484.8000488281,-7.0999999046326}, {2246.3999023438,2431.6999511719,-7.0999999046326}, } policebikeSpawns = {-- Police Bikes Spawnen NUR in PD Garagen {1601.1999511719,-1709.0999755859,5.5999999046326}, {-1603.9000244141,675.59997558594,-5.5999999046326}, {2281.5,2432.1999511719,-7.8000001907349}, } newsmavSpawns = {-- News Maverick Spawns {-374.10000610352,1570.4000244141,76.099998474121}, {-2228.1000976563,2326.1000976563,7.8000001907349}, {-2479.1000976563,-2644.8000488281,72.199996948242}, {-1427.4000244141,-952.09997558594,201.39999389648}, } beagleSpawns = { {-1437.4000244141,-532.29998779297,15.699999809265}, {-1357.8000488281,-496.10000610352,15.699999809265}, {1395.9000244141,1435.9000244141,12.300000190735}, {1473.0999755859,1433.8000488281,12.300000190735}, } raindanceSpawns = { {1907,-516.40002441406,19.7000007629390}, {-2367.3999023438,-2753,9.5}, {-1468.5999755859,1491.5999755859,9.1000003814697}, } AndromadaSpawns = { {1397.6109619141 ,1296.9703369141 ,11.643087387085}, {1897.7740478516 ,-2442.3977050781 ,14.350085258484}, } mesaSpawns = { {-1034.3000488281,-717.79998779297,32.200000762939}, {-726.09997558594,1544.0999755859,39.799999237061}, {-2197.3999023438,-1193.5999755859,15.89999961853}, } truckSpawns = { {-1427.0999755859,-1580.6999511719,102.5}, {-3455.1733398438, 927.365234375, 31.1015625}, } banditoSpawns = { {-419.29998779297,1362.0999755859,12.60000038147}, -- {-1833.5999755859,2043.9000244141,8.5}, } freewaySpawns = { {2285.3999023438,1517.4000244141,36}, {298.70001220703,-1535.5999755859,24.200000762939}, {-1826.5,1290.1999511719,22.200000762939}, {-2344.6999511719,-124.80000305176,34.900001525879}, } trailerSpawn1 = { {2664.5,2702.8999023438,12}, } trailerSpawn2 = { {1309.6999511719,1142.5999755859,11.5}, } hospitalPacks = { {-2670.87890625,636.8984375,14.453125}, {-2637.0556640625,635.03125,14.453125}, {-1515.669921875,2519.166015625,56.0703125}, {-1513.888671875,2519.5908203125,56.064819335938}, {-1528.8955078125,2516.724609375,55.986171722412}, {2022.1650390625,-1402.6806640625,17.18045425415}, {2042.7001953125,-1409.4775390625,17.1640625}, {-316.5478515625,1051.6494140625,20.340259552002}, {-337.9541015625,1049.490234375,19.739168167114}, {-331.5849609375,1046.037109375,26.012474060059}, {-307.0419921875,1045.27734375,26.012474060059}, {1171.490234375,-1310.560546875,13.986573219299}, {1171.609375,-1306.556640625,13.996350288391}, {1158.5048828125,-1326.333984375,31.503561019897}, {1159.80078125,-1323.9013671875,31.498970031738}, {1238.7119140625,328.2431640625,19.7555103302}, {1229.365234375,311.1435546875,24.7578125}, {-2204.07421875,-2309.58203125,31.375}, {1615.939453125,1818.0537109375,10.8203125}, {1601.9443359375,1816.736328125,10.8203125}, {1590.0166015625,1792.0234375,30.46875}, {1607.3232421875,1776.7412109375,37.3125}, {2107.7626953125,926.16015625,10.8203125}, {2116.12890625,925.7705078125,10.9609375}, {2122.1865234375,925.3193359375,10.8203125}, } patrolPoints = { {-1603.2197265625,-2712.736328125,48.9453125}, {2465.748046875,-2215.55859375,13.546875}, {2473.439453125,-2215.56640625,13.546875}, {2480.0732421875,-2216.140625,13.546875}, {2487.24609375,-2215.5966796875,13.546875}, {2494.1005859375,-2215.5859375,13.546875}, {-1686.6728515625,408.9970703125,7.3984375}, {-1682.34375,412.9384765625,7.3984375}, {-1680.0263671875,402.3642578125,7.3984375}, {-1675.84375,406.4677734375,7.3984375}, {-1670.5615234375,411.8359375,7.3984375}, {-1666.2392578125,416.2509765625,7.3984375}, {-1672.7939453125,422.81640625,7.3984375}, {-1677.20703125,418.46484375,7.3984375}, {-2410.7021484375,969.9091796875,45.4609375}, {-2410.744140625,975.220703125,45.4609375}, {-2410.837890625,980.5302734375,45.4609375}, {-1329.3046875,2668.5126953125,50.46875}, {-1328.7314453125,2673.90625,50.0625}, {-1327.0185546875,2679.3876953125,50.46875}, {-1327.3798828125,2684.62890625,50.0625}, {1940.7099609375,-1778.5244140625,13.390598297119}, {1940.6552734375,-1774.908203125,13.390598297119}, {1940.630859375,-1771.728515625,13.390598297119}, {1940.7080078125,-1767.3837890625,13.390598297119}, {-1477.921875,1868.138671875,32.639846801758}, {-1466.1552734375,1869.0048828125,32.6328125}, {-1464.5224609375,1861.3828125,32.639846801758}, {-1477.4599609375,1860.5205078125,32.6328125}, {-735.9208984375,2744.0087890625,47.2265625}, {-739.0439453125,2744.2421875,47.165451049805}, {377.6953125,2601.1083984375,16.484375}, {624.5263671875,1676.25390625,6.9921875}, {620.2958984375,1681.2431640625,6.9921875}, {616.248046875,1686.4169921875,7.1875}, {612.783203125,1691.1650390625,7.1875}, {609.2060546875,1696.201171875,7.1875}, {605.8505859375,1700.978515625,7.1875}, {602.27734375,1706.3603515625,7.1875}, {2141.037109375,2742.734375,10.960174560547}, {2142.3115234375,2752.6982421875,10.96019744873}, {2147.9521484375,2752.3203125,10.8203125}, {2152.60546875,2751.953125,10.8203125}, {2152.984375,2743.85546875,10.8203125}, {2147.75,2743.7392578125,10.8203125}, {-97.6298828125,-1175.0283203125,2.4990689754486}, {-90.74609375,-1177.853515625,2.2021217346191}, {-84.75390625,-1163.853515625,2.3359375}, {-91.5771484375,-1160.5732421875,2.4453125}, {-1606.525390625,-2717.2138671875,48.9453125}, {-1609.7109375,-2721.544921875,48.9453125}, {-1599.83203125,-2708.302734375,48.9453125}, {-2246.314453125,-2558.8212890625,32.0703125}, {-2241.3125,-2561.3662109375,32.0703125}, {-1132.2880859375,-135.0986328125,14.14396572113}, {-1153.529296875,-156.373046875,14.1484375}, {-1142.826171875,-145.67578125,14.14396572113}, {655.611328125,-557.9912109375,16.501491546631}, {655.6572265625,-572.1728515625,16.501491546631}, {1601.791015625,2203.90625,11.060997009277}, {1596.806640625,2203.4345703125,10.8203125}, {1590.197265625,2203.4853515625,10.8203125}, {1589.4775390625,2195.43359375,10.8203125}, {1596.125,2194.294921875,10.8203125}, {1601.6591796875,2194.3369140625,10.8203125}, {2206.8466796875,2470.47265625,10.8203125}, {2206.94140625,2474.75,10.8203125}, {2206.9267578125,2478.86328125,10.8203125}, {2198.06640625,2480.6953125,10.8203125}, {2197.541015625,2475.791015625,10.995170593262}, {2197.609375,2471.9169921875,10.995170593262}, {2120.8251953125,915.4833984375,10.8203125}, {2115.1181640625,915.44140625,10.8203125}, {2109.076171875,915.4228515625,10.8203125}, {2109.22265625,924.8779296875,10.9609375}, {2114.9404296875,924.8857421875,10.9609375}, {2119.5126953125,925.2861328125,10.9609375}, {2645.7197265625,1112.7802734375,10.8203125}, {2639.984375,1112.56640625,10.8203125}, {2634.828125,1112.3466796875,10.9609375}, {2634.1826171875,1101.9482421875,10.8203125}, {2636.7509765625,1101.6748046875,10.8203125}, {2643.5126953125,1101.81640625,10.8203125}, {2209.576171875,2469.8251953125,10.8203125}, {2208.8310546875,2475.09375,10.8203125}, {1005.078125,-901.7490234375,42.216625213623}, {993.025390625,-902.474609375,42.222496032715}, } lootItems = { ["helicrashsides"] = { {"Night Vision Goggles",368,1,90,10}, {"Rocket Launcher",359,1,90,5}, {"Heat-Seeking RPG",360,1,90,4}, {"Lighter",328,0.4,90,2}, {"Pistol",346,1,90,10}, {"Silenced Pistol",347,1,90,7}, {"Shotgun",349,1,90,6}, {"Uzi",352,1,90,5.5}, --{"Knife",335,1,90,4}, {"Katana",339,1,90,3}, {"Pizza",1582,1,0,2}, {"Soda Bottle",2647,1,0,2}, {"Empty Jerry Can",1650,1,0,2}, {"Roadflare",324,1,90,2}, {"Milk",2856,1,0,1}, {"Painkiller",2709,0.5,0,4}, {"Empty Soda Cans",2673,0.5,0,2}, {"Grenade",342,1,0,4}, {"Parachute",342,1,0,80}, {"Sawn-Off Shotgun",350,1,90,5}, {"SPAZ-12 Combat Shotgun",351,1,90,4}, {"MP5",353,1,90,6}, {"Watch",2710,1,0,4}, {"Heat Pack",1576,1,0,3}, {"Wire Fence",933,0.25,0,1}, {"Country Rifle",357,1,90,6}, {"Night Vision Goggles",368,1,90,1.5}, {"Binocular",369,1,0,4}, {"Tire",1073,1,0,2}, {"Morphine",1579,1,0,4}, {"Army Clothing",1577,1,0,4.5}, {"Juggernaut Suit",1577,1,0,4.5}, {"BAT Clothing",1577,1,0,4.5}, {"Army special forces Clothing",1577,1,0,4.5}, {"Ghost Clothing",1577,1,0,4.5}, {"Army[F] Clothing",1577,1,0,4.5}, {"civilian[F] Clothing",1577,1,0,4.5}, {"Police Clothing",1577,1,0,4.5}, {"SAS Clothing",1577,1,0,4.5}, {"SGT Clothing",1577,1,0,4.5}, {"Task Force Clothing",1577,1,0,4.5}, {"Survivor[F] Clothing",1577,1,0,4.5}, {"Civilian Clothing",1577,1,0,3}, {"TEC-9",372,1,90,4}, {"AK-47",355,1,90,7}, {"GPS",2976,0.15,0,3}, {"Map",1277,0.8,90,7}, {"Toolbox",2359,0.5,0,1}, {"Engine",929,0.3,0,2}, {"Tent",1279,1,0,4.5}, {"Ghilli Suit",1577,1,0,1.5}, {"Ghilli Suit Woman",1575,1,0,1.5}, {"M4",356,1,90,1}, {"Sniper Rifle",358,1,90,1.5}, {"Infrared Goggles",369,1,90,3}, {"Alice Backpack",1248,0.5,0,5}, {"Coyote Backpack",1252,1.3,0,2}, {"Flashbang",343,1,0,4}, --{"RPK",334,1,90,1}, --{"Thermal GPS",2976,0.2,0,3}, --{"GPS Jammer",2976,0.2,0,4}, }, ["hospital"] = { {"Medic Kit",2891,0.7,0}, {"Heat Pack",1576,1,0}, {"Bandage",1578,0.5,0}, {"Blood Bag",1580,1,0}, {"Morphine",1579,1,0}, {"Blood Bag",1580,1,0}, {"Medic Kit",2891,0.7,0}, {"Blood Bag",1580,1,0}, {"Painkiller",1580,1,0}, }, } vehicleAddonsInfo = { {422,4,1}, {470,4,1}, {468,2,1}, {433,6,1}, {437,6,1}, {487,0,1}, {497,0,1}, {593,3,1}, {598,4,1}, {599,4,1}, {471,4,1}, {523,2,1}, {488,0,1}, {511,3,1}, {563,2,1}, {500,4,1}, {514,6,1}, {568,4,1}, {584,0,0}, {591,0,0}, {463,2,1}, {473,0,1}, {506,4,1}, {507,4,1}, {554,4,1}, {411,4,1}, {444,4,1}, {451,4,1}, {402,4,1}, {416,4,1}, {495,4,1}, {428,4,1}, {541,4,1}, {560,4,1}, {566,4,1}, {579,4,1}, {580,4,1}, {580,4,1}, {601,4,1}, {424,4,1}, {522,2,1}, {544,4,1}, {482,4,1}, {490,4,1}, {489,4,1}, {586,2,1}, {592,3,1}, } function getVehicleAddonInfos (id) for i,veh in ipairs(vehicleAddonsInfo) do if veh[1] == id then return veh[2],veh[3] end end end function createHeliCrashSite() if cargoCol then destroyElement(getElementData(cargoCol,"parent")) destroyElement(cargoCol) end local item_id = math.random(table.size(heliCrashSites)) local x,y,z = heliCrashSites[item_id][1],heliCrashSites[item_id][2],heliCrashSites[item_id][3] cargobob = createVehicle(548,x,y,z,nil,nil,nil) setElementHealth(cargobob,0) setElementFrozen(cargobob,true) cargoCol = createColSphere(x,y,z,3) setElementData(cargoCol,"parent",cargobob) setElementData(cargoCol,"helicrash",true) setElementData(cargoCol,"MAX_Slots",0) for i, item in ipairs(lootItems["helicrashsides"]) do local value = math.percentChance (item[5]*3.5,math.random(1,2)) setElementData(cargoCol,item[1],value) --weapon Ammo local ammoData,weapID = getWeaponAmmoType (item[1],true) if ammoData and value > 0 then setElementData(cargoCol,ammoData,math.random(1,2)) end end setTimer(createHeliCrashSite,3600000,1) end createHeliCrashSite() function updateHospitals () for i,box in pairs(hospitalCol) do for _,items in ipairs(lootItems["hospital"]) do setElementData(hospitalCol,items[1],math.random(1,5)) end end setTimer(updateHospitals,3600000,1) end hospitalCol = {} function createHospitalPacks() number1 = 0 for i,box in ipairs(hospitalPacks) do number1 = number1+1 local x,y,z = box[1],box[2],box[3] object = createObject(1558,x,y,z,nil,nil,nil) hospitalCol = createColSphere(x,y,z,2) setElementData(hospitalCol,"parent",object) setElementData(hospitalCol,"hospitalbox",true) setElementData(hospitalCol,"MAX_Slots",20) for _,items in ipairs(lootItems["hospital"]) do local randomNumber = math.random(1,10) if randomNumber >= 2 then setElementData(hospitalCol,items[1],math.random(1,5)) end end end setTimer(updateHospitals,3600000,1) end createHospitalPacks() for i,patrol in ipairs(patrolPoints) do local x,y,z = patrol[1],patrol[2],patrol[3] patrolCol = createColSphere(x,y,z,3) setElementData(patrolCol,"patrolstation",true) end trailer1 = 0 trailer2 = 0 dayzVehicles = {} function spawnDayZVehicles() --[[ for i,veh in ipairs(trailerSpawn1) do if trailer1 == 0 then local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(584,x,y,z) vehCol = createColSphere(x,y,z,1.5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",0) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{584,x,y,z}) --others setElementData(vehCol,"fuel",0) trailer1 = trailer1+1 end end for i,veh in ipairs(trailerSpawn2) do if trailer2 == 0 then local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(591,x,y,z) vehCol = createColSphere(x,y,z,1.5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",250) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{591,x,y,z}) --others setElementData(vehCol,"fuel",0) trailer2 = trailer2+1 end end ]] for i,veh in ipairs(freewaySpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(463,x,y,z) vehCol = createColSphere(x,y,z,1.5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",6) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{463,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(policebikeSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(523,x,y,z) vehCol = createColSphere(x,y,z,1.5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",6) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{523,x,y,z}) --others setElementData(vehCol,"fuel",10) end -------------------------------------------------- for i,veh in ipairs(supergteSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(506,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 20) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{506,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end for i,veh in ipairs(ElegantSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(507,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 50) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{507,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end for i,veh in ipairs(YosemiteSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(554,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 100) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{554,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(InfernusSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(411,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 35) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{411,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(MonsterSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(444,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 150) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{444,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(TurismoSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(451,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 20) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{451,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(BuffaloSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(402,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 42) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{402,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(AmbulanceSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(416,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 60) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{416,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ------------------------------------------------------ for i,veh in ipairs(SandkingSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(495,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 45) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{495,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ----------------------------------------------------------- for i,veh in ipairs(FBITruckSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(428,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 45) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{428,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end -------------------------------------------------------------------- for i,veh in ipairs(BulletSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(541,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 24) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{541,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ------------------------------------------------------------- for i,veh in ipairs(SultanSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(560,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 50) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{560,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ----------------------------------------------------------------- for i,veh in ipairs(TahomaSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(566,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 30) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{566,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ----------------------------------------------------------------- for i,veh in ipairs(HuntleySpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(579,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 60) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{579,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ------------------------------------------------------------ for i,veh in ipairs(StaffordSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(580,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 28) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{580,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end for i,veh in ipairs(SWATSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(601,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 50) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{601,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ------------------------------------------------------------------ for i,veh in ipairs(BoxvilleSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(424,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 160) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{424,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end --------------------------------------------------------------- for i,veh in ipairs(NRGSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(522,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 10) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{522,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(FiretruckSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(544,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 24) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{544,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(BurritoSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(482,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 30) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{482,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end --------------- for i,veh in ipairs(FBIRancherSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(490,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 60) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{490,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------- for i,veh in ipairs(RancherSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(489,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 60) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{489,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(AndromadaSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(592,x,y,z) vehCol = createColSphere(x,y,z,10) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 500) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{592,x,y,z}) -- Anderes setElementData(vehCol,"fuel",2) end ---------------------------------------------------------------------- for i,veh in ipairs(WayfarerSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(586,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 20) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{586,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end ---------------------------------------------------------------------- for i,veh in ipairs(banditoSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(568,x,y,z) vehCol = createColSphere(x,y,z,2) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",10) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{568,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(mesaSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(500,x,y,z) vehCol = createColSphere(x,y,z,2) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",20) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{500,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(truckSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(514,x,y,z) vehCol = createColSphere(x,y,z,2) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",10) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{514,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(pickupSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(422,x,y,z) vehCol = createColSphere(x,y,z,2) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",20) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{422,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(beagleSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(511,x,y,z) vehCol = createColSphere(x,y,z,5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",40) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{511,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(dodoSpawnPoints) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(593,x,y,z) vehCol = createColSphere(x,y,z,5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",10) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{593,x,y,z}) --others setElementData(vehCol,"fuel",10) end --Police Ranger for i,veh in ipairs(policerangerSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(599,x,y,z) vehCol = createColSphere(x,y,z,3) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 30) -- Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{599,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end --Police Cars for i,veh in ipairs(policecarSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(598,x,y,z) vehCol = createColSphere(x,y,z,2.5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots", 30) --Motor + Reifen local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) -- Modifikation setElementData(vehCol,"spawn",{598,x,y,z}) -- Anderes setElementData(vehCol,"fuel",10) end for i,veh in ipairs(patriotSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(470,x,y,z) vehCol = createColSphere(x,y,z,2.5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",38) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{470,x,y,z}) --others setElementData(vehCol,"fuel",10) for i,items in ipairs(lootItems["helicrashsides"]) do local randomNumber = math.random(1,10) if randomNumber == 5 then setElementData(vehCol,items[1],1) end end end for i,veh in ipairs(sanchezSpanws) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(468,x,y,z) vehCol = createColSphere(x,y,z,1.5) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",6) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{468,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(barracksSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(433,x,y,z) vehCol = createColSphere(x,y,z,4) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",64) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{433,x,y,z}) --others setElementData(vehCol,"fuel",10) for i,items in ipairs(lootItems["helicrashsides"]) do local randomNumber = math.random(1,10) if randomNumber == 5 then setElementData(vehCol,items[1],math.random(1,2)) end end end for i,veh in ipairs(coachSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(437,x,y,z) vehCol = createColSphere(x,y,z,4) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",56) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{437,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(SchlauchBootSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(473,x,y,z) vehCol = createColSphere(x,y,z,4) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",6) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{473,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,veh in ipairs(quadSpawns) do local x,y,z = veh[1],veh[2],veh[3] veh = createVehicle(471,x,y,z) vehCol = createColSphere(x,y,z,2) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",10) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{471,x,y,z}) --others setElementData(vehCol,"fuel",10) end for i,tent in ipairs(tentSpawns) do local x,y,z = tent[1],tent[2],tent[3] tent = createObject(3243,x,y,z-1) setObjectScale(tent,0.5) tentCol = createColSphere(x,y,z,4) attachElements ( tentCol, tent, 0, 0, 0 ) setElementData(tentCol,"parent",tent) setElementData(tent,"parent",tentCol) setElementData(tentCol,"tent",true) setElementData(tentCol,"vehicle",true) setElementData(tentCol,"MAX_Slots",30) end -- News Mav Spawns local item_id = math.random(table.size(raindanceSpawns)) local x,y,z = raindanceSpawns[item_id][1],raindanceSpawns[item_id][2],raindanceSpawns[item_id][3] hunter = createVehicle(563,x,y,z) vehCol = createColSphere(x,y,z,4) attachElements ( vehCol, hunter, 0, 0, 0 ) setElementData(vehCol,"parent",hunter) setElementData(hunter,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",20) --Engine + Tires local tires,engine = getVehicleAddonInfos (563) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{563,x,y,z}) --others setElementData(vehCol,"fuel",10) -- News Mav Spawns local item_id = math.random(table.size(newsmavSpawns)) local x,y,z = newsmavSpawns[item_id][1],newsmavSpawns[item_id][2],newsmavSpawns[item_id][3] hunter = createVehicle(488,x,y,z) vehCol = createColSphere(x,y,z,4) attachElements ( vehCol, hunter, 0, 0, 0 ) setElementData(vehCol,"parent",hunter) setElementData(hunter,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",10) --Engine + Tires local tires,engine = getVehicleAddonInfos (488) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{488,x,y,z}) --others setElementData(vehCol,"fuel",10) --Maverik local item_id = math.random(table.size(maverikSpawns)) local x,y,z = maverikSpawns[item_id][1],maverikSpawns[item_id][2],maverikSpawns[item_id][3] hunter = createVehicle(487,x,y,z) vehCol = createColSphere(x,y,z,4) attachElements ( vehCol, hunter, 0, 0, 0 ) setElementData(vehCol,"parent",hunter) setElementData(hunter,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",10) --Engine + Tires local tires,engine = getVehicleAddonInfos (487) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{487,x,y,z}) --others setElementData(vehCol,"fuel",10) --Police Maverik local item_id = math.random(table.size(hunterSpawns)) local x,y,z = hunterSpawns[item_id][1],hunterSpawns[item_id][2],hunterSpawns[item_id][3] hunter = createVehicle(497,x,y,z) vehCol = createColSphere(x,y,z,4) attachElements ( vehCol, hunter, 0, 0, 0 ) setElementData(vehCol,"parent",hunter) setElementData(hunter,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",10) --Engine + Tires local tires,engine = getVehicleAddonInfos (497) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{497,x,y,z}) --others setElementData(vehCol,"fuel",10) end --spawnDayZVehicles() function spawnVehiclePack (ps,cmd) if getPlayerSerial(ps) == "32E6DF757528C1F2CDC804EED6722583" then spawnDayZVehicles() end end addCommandHandler("svp",spawnVehiclePack) function notifyAboutExplosion() local col = getElementData(source,"parent") local x1,y1,z1 = getElementPosition(source) id,x,y,z = getElementData(col,"spawn")[1],getElementData(col,"spawn")[2],getElementData(col,"spawn")[3],getElementData(col,"spawn")[4] setTimer(respawnDayZVehicle,1800000,1,id,x,y,z,source,col,getElementData(col,"MAX_Slots")) setElementData(col,"deadVehicle",true) setElementData(source,"isExploded",true) createExplosion (x1+4,y1+1,z1,4) createExplosion (x1+2,y1-4,z1,4) createExplosion (x1-1,y1+5,z1,4) createExplosion (x1-4,y1,z1-2,4) end addEventHandler("onVehicleExplode", getRootElement(), notifyAboutExplosion) function respawnVehiclesInWater (vehiclesInWater) for i,veh in ipairs(vehiclesInWater) do if getElementModel(veh) == 473 then break end local col = getElementData(veh,"parent") id,x,y,z = getElementData(col,"spawn")[1],getElementData(col,"spawn")[2],getElementData(col,"spawn")[3],getElementData(col,"spawn")[4] respawnDayZVehicle(id,x,y,z,veh,col,getElementData(col,"MAX_Slots")) end end addEvent("respawnVehiclesInWater",true) addEventHandler("respawnVehiclesInWater",getRootElement(),respawnVehiclesInWater) function checkVehicleInWater () local randomPlayer = getRandomPlayer() triggerClientEvent("checkVehicleInWaterClient",randomPlayer) end setTimer(checkVehicleInWater,1800000,0) --1800000 function respawnDayZVehicle(id,x,y,z,veh,col,max_slots) if id == 497 then local item_id = math.random(table.size(hunterSpawns)) x,y,z = hunterSpawns[item_id][1],hunterSpawns[item_id][2],hunterSpawns[item_id][3] end if id == 487 then local item_id = math.random(table.size(maverikSpawns)) x,y,z = maverikSpawns[item_id][1],maverikSpawns[item_id][2],maverikSpawns[item_id][3] end destroyElement(veh) destroyElement(col) veh = createVehicle(id,x,y,z+1) vehCol = createColSphere(x,y,z,4) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",max_slots) --Engine + Tires local tires,engine = getVehicleAddonInfos (getElementModel(veh)) setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) --vehicle_indentifikation setElementData(vehCol,"spawn",{id,x,y,z}) --others setElementData(vehCol,"fuel",10) if id == 433 then for i,items in ipairs(lootItems["helicrashsides"]) do local randomNumber = math.random(1,10) if randomNumber == 5 then setElementData(vehCol,items[1],math.random(1,2)) end end elseif id == 470 then for i,items in ipairs(lootItems["helicrashsides"]) do local randomNumber = math.random(1,10) if randomNumber == 5 then setElementData(vehCol,items[1],math.random(1,2)) end end end end vehicleFuelInfo = { {422,0.25}, {470,0.1}, {468,0.1}, {433,0.5}, {437,0.5}, {487,0.25}, {497,0.25}, {473,0.1}, {593,0.6}, {598,0.1}, {599,0.2}, {471,0.2}, {523,0.1}, {488,0.25}, {511,0.6}, {563,0.25}, {500,0.1}, {514,0.4}, {568,0.2}, {584,0}, {591,0}, {568,0.1}, {463,0.2}, {506,0.1}, {507,0.1}, {554,0.1}, {411,0.1}, {444,0.1}, {451,0.1}, {402,0.1}, {416,0.1}, {495,0.1}, {428,0.1}, {541,0.1}, {560,0.1}, {566,0.1}, {579,0.1}, {580,0.1}, {580,0.1}, {601,0.1}, {424,0.1}, {522,0.1}, {544,0.1}, {482,0.1}, {490,0.1}, {489,0.1}, {586,0.1}, {592,0.1}, } function onPlayerEnterDayzVehicle(veh,seat) local col = getElementData(veh,"parent") local id = getElementModel(veh) if not seat == 1 then return end local tires,engine = getVehicleAddonInfos (id) setVehicleEngineState ( veh, false ) setElementData(veh,"maxfuel",getVehicleMaxFuel(col)) setElementData(veh,"needtires",tires) setElementData(veh,"needengines",engine) if ((getElementData(col,"Tire_inVehicle") or 0) < tonumber(tires)) then setVehicleEngineState ( veh, false ) return end if ((getElementData(col,"Engine_inVehicle") or 0) < tonumber(engine)) then setVehicleEngineState ( veh, false ) return end if (getElementData(col,"fuel") or 0) <= 1 then if not getElementModel(veh) == 509 then triggerClientEvent (source, "displayClientInfo", source,"Vehicle","There is no fuel in this Vehicle",22,255,0) setVehicleEngineState ( veh, false ) return end end setVehicleEngineState ( veh, true ) bindKey(source,"k","down",setEngineStateByPlayer) outputChatBox("Press 'k' to change the engine status.",source) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), onPlayerEnterDayzVehicle ) function onPlayerExitDayzVehicle(veh,seat) if seat == 0 then setVehicleEngineState ( veh, false ) unbindKey(source,"k","down",setEngineStateByPlayer) end end addEventHandler ( "onPlayerVehicleExit", getRootElement(), onPlayerExitDayzVehicle ) function getVehicleFuelRemove (id) for i,veh in ipairs(vehicleFuelInfo) do if veh[1] == id then return veh[2] end end end function setVehiclesFuelPerMinute () for i,veh in ipairs(getElementsByType("vehicle")) do if getVehicleEngineState(veh) == true then if getElementData(getElementData(veh,"parent"),"fuel") >= 0 then setElementData(getElementData(veh,"parent"),"fuel",getElementData(getElementData(veh,"parent"),"fuel")-getVehicleFuelRemove(getElementModel(veh))) else setVehicleEngineState ( veh, false ) end end end end setTimer(setVehiclesFuelPerMinute,20000,0) function isVehicleReadyToStart2 (veh) if getElementData(getElementData(veh,"parent"),"fuel") >= 1 then local tires,engine = getVehicleAddonInfos (getElementModel(veh)) if (getElementData(getElementData(veh,"parent"),"Tire_inVehicle") or 0) > tonumber(tires) and (getElementData(getElementData(veh,"parent"),"Engine_inVehicle") or 0) > tonumber(engine) then setVehicleEngineState ( veh, true ) end end setTimer(isVehicleReadyToStart2,1000,1,veh) end repairTimer = {} function repairVehicle (veh) if repairTimer[veh] then triggerClientEvent (source, "displayClientInfo", source,"Vehicle",getVehicleName(veh).." is already going to be repaired",255,22,0) return end setElementData(source,"repairing",true) local health = math.floor(getElementHealth(veh)) repairTimer[veh] = setTimer(fixVehicleDayZ,(1000-health)*120,1,veh,source) setElementFrozen (veh,true) setElementData(veh,"repairer",source) setElementData(source,"repairingvehicle",veh) setPedAnimation (source,"SCRATCHING","sclng_r",nil,true,false) triggerClientEvent (source, "displayClientInfo", source,"Vehicle","You started repairing "..getVehicleName(veh),22,255,0) end addEvent("repairVehicle",true) addEventHandler("repairVehicle",getRootElement(),repairVehicle) function fixVehicleDayZ(veh,player) setElementHealth(veh,1000) fixVehicle (veh) setPedAnimation(player,false) setElementFrozen (veh,false) setElementData(source,"repairing",false) repairTimer[veh] = nil setElementData(veh,"repairer",nil) setElementData(player,"repairingvehicle",nil) triggerClientEvent (player, "displayClientInfo", player,"Vehicle","You finished repairing "..getVehicleName(veh),22,255,0) end function stopFixxingWhileMoving() local veh = getElementData(source,"repairingvehicle") setPedAnimation(source) setElementFrozen (veh,false) setElementData(veh,"repairer",nil) setElementData(source,"repairingvehicle",nil) triggerClientEvent (source, "displayClientInfo", source,"Vehicle","You stopped repairing "..getVehicleName(veh),255,22,0) killTimer(repairTimer[veh]) repairTimer[veh] = nil end addEvent("onClientMovesWhileAnimation",true) addEventHandler("onClientMovesWhileAnimation",getRootElement(),stopFixxingWhileMoving) function debugFixxing() for i,veh in ipairs(getElementsByType("vehicle")) do if getElementData(veh,"repairer") == source then outputDebugString("Vehicle repairer disconnected - destgroyed tables") killTimer(repairTimer[veh]) setElementFrozen (veh,false) repairTimer[veh] = nil setElementData(veh,"repairer",nil) end end end addEventHandler("onPlayerQuit",getRootElement(),debugFixxing) function setEngineStateByPlayer (playersource) if getElementData(getElementData(veh,"parent"),"fuel") <= 0 then outputChatBox("This vehicle tank is empty!", playersource, 255, 22, 0) return end local veh = getPedOccupiedVehicle (playersource) setVehicleEngineState (veh, not getVehicleEngineState(veh)) if getVehicleEngineState(veh) == true then triggerClientEvent (playersource, "displayClientInfo", playersource,"Vehicle","You started the Engine.",22,255,0) else triggerClientEvent (playersource, "displayClientInfo", playersource,"Vehicle","You stopped the Engine. ",255,22,0) end end Its not working
-
Hey Guys can you tell me what is wrong this? function makeTargetFollow ( target ) if ( target ) and ( getElementType(target) == "player" ) then local x,y,z = getElementPosition( source ) local tx,ty,tz = getElementPosition( target ) if ( getDistanceBetweenPoints3D( x,y,z,tx,ty,tz ) <= 7 ) then toggleAllControls( target, false ) setControlState( target, "forwards", true) setTimer( updateRotation, 500, 0, source, target ) end end end addEventHandler( "onPlayerTarget", root, makeTargetFollow ) function updateRotation( player, target ) if ( isElement(player) ) and ( isElement(target) ) then local x,y = getElementPosition( player ) local tx,ty = getElementPosition( target ) local rot = findRotation(tx,ty,x,y) setElementRotation ( target, 0, 0, rot ) end end function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end
-
How to make a script that if the person type a name/ip address the outputchat will say "This is the best server ever"
-
can you see me the full script? im new