отрефактори код. названия переменных, чистота, все такое... function main() while not…
- User
отрефактори код. названия переменных, чистота, все такое...
function main() while not isSampAvailable() do wait(80) end while true do wait(0) if isCharInAnyCar(playerPed) then -- and isKeyDown(90) then print("g") veh = samem.player_vehicle[0] if veh ~= samem.nullptr then local vehicle = storeCarCharIsInNoSave(playerPed) local x, y, z = mad.get_vehicle_dummy_element_position(vehicle, 6, true) print(x, y, z) local lightPos = ffi.new("vector3d") lightPos.x, lightPos.y, lightPos.z = x, y, z
codelocal textureMem = mad.texture.from_memory(0xC403F4) local texturePtr = textureMem:get_pointer() sampAddChatMessage("texturePtr = " .. tostring(texturePtr), -1) local x1, y1, x2, y2 = calculateShadowCoordinates(1, 1, 0) local frontX, frontY = 0.5, 0 local sideX, sideY = 0, 0.5 local red, green, blue = 155, 155, 155 local maxViewAngle = 255 CShadows__StoreCarLightShadow( veh, 1, texturePtr, lightPos, frontX, frontY, sideX, sideY, red, green, blue, maxViewAngle ) sampAddChatMessage("+++", -1) end end end--end
- Assistant