zMpyster Posted December 22, 2019 Share Posted December 22, 2019 posCars = { [1] = {-60.607, -1891.674, 7.345, -0, 0, 38.494, 589}, [2] = {-67.794, -1893.794, 7.373, -0, 0, 6.455, 402}, [3] = {-63.686, -1876.661, 7.145, -0, 0, 68.574, 492}, [4] = {-68.76, -1883.958, 7.231, -0, 0, 64.54, 546}, [5] = {-72.508, -1875.779, 7.144, -0, 0, 37.604, 400}, [6] = {-74.556, -1893.794, 7.375, -0, 0, 9.432, 579}, [7] = {-96.755, -1874.517, 7.059, -0, 0, 300.318, 580}, [8] = {-86.229, -1883.356, 7.192, -0, 0, 329.811, 550}, [9] = {-88.031, -1875.9, 7.092, -0, 0, 305.942, 494}, [10] = {-83.617, -1895.983, 7.36, -0, 0, 342, 474}, [11] = {-90.568, -1893.863, 7.321, -0, 0, 324.894, 603}, [12] = {-95.74, -1889.7, 7.257, -0, 0, 322.857, 549, 500}, [13] = {-102.904, -1884.16, 7.173, -0, 0, 316.183, 507}, [14] = {-115.831, -1879.266, 7.087, -0, 0, 320.578, 483}, [15] = {-113.032, -1883.835, 7.151, -0, 0, 309.337, 404}, [16] = {-87.334, -1907.68, 7.5, -0, 0, 350.368, 502}, [17] = {-81.205, -1913.04, 7.581, -0, 0, 9.733, 536}, [18] = {-93.914, -1914.425, 7.576, -0, 0, 339.613, 600}, [19] = {-100.304, -1902.246, 7.412, -0, 0, 323.16, 421}, [20] = {-108.174, -1900.021, 7.369, -0, 0, 307.313, 602}, [21] = {-102.732, -1916.18, 7.583, -0, 0, 330.774, 540}, [22] = {-112.588, -1910.002, 7.491, -0, 0, 311.229, 445}, [23] = {-119.002, -1905.607, 7.423, -0, 0, 304.179, 426}, [24] = {-115.182, -1917.262, 7.581, -0, 0, 294.489, 566}, [25] = {-122.122, -1914.214, 7.529, -0, 0, 315.483, 604}, [26] = {-116.957, -1892.801, 7.26, -0, 0, 305.495, 547}, [27] = {-118.075, -1899.84, 7.35, -0, 0, 303.497, 411}, [28] = {-124.798, -1891.835, 7.234, -0, 0, 314.033}, [29] = {-128.865, -1875.398, 7.014, -0, 0, 293.666}, [30] = {-131.948, -1881.229, 7.084, -0, 0, 312.091}, [31] = {-122.083, -1903.347, 12.111, -0, 0, 325.415}, [32] = {-104.14, -1914.299, 12.289, -0, 0, 344.294}, } function resourceStart() for k=1, #posCars do car[k] = createVehicle(posCars[k][7] or 411, posCars[k][1], posCars[k][2], posCars[k][3], posCars[k][4], posCars[k][5], posCars[k][6]) setVehicleDamageProof(car[k], true) setVehicleLocked(car[k], true) setVehicleColor(car[k], 255, 255, 255) setTimer (function() setElementFrozen(car[k], true) end, 3000, 1) end end addEventHandler("onResourceStart", resourceRoot, resourceStart) Esse script estava normal, porém hj fui iniciá-lo e começou a spawnar 2 carros ao invés de apenas 1 cliente: obj = createObject(1917, -100.8, -1879.4, -4.3, 0.75, 0, 187.75) objLowLOD = createObject ( 1917, -100.8, -1879.4, -4.3,0.75, 0, 187.75,true ) setLowLODElement ( obj, objLowLOD ) engineSetModelLODDistance ( 1917, 300 ) attempt to call global 'engineSetModelLODDistance' (a nil value) esse erro tbm, começou a dar apenas agr, eu queria deixar o debug limpo, esse erro não está interferindo em nada, porém fica dando no debug Link to comment
Tommy. Posted December 22, 2019 Share Posted December 22, 2019 Testei o código e está funcionando perfeitamente, só spawnou 1 veículo. 1 Link to comment
DNL291 Posted December 23, 2019 Share Posted December 23, 2019 9 hours ago, zMpyster said: attempt to call global 'engineSetModelLODDistance' (a nil value) esse erro tbm, começou a dar apenas agr, eu queria deixar o debug limpo, esse erro não está interferindo em nada, porém fica dando no debug Tem certeza que esse código está como client-side? O erro acima ocorre quando não identifica como uma função. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now