Mr.OppS Posted June 10, 2017 Share Posted June 10, 2017 السلآم عليكم, كيف الحال؟ مـود مرقبة سرعة سيارات,, اذا سيارة سريعة يأخذ فلوس ,,, المود اشغلة يطلع هذه الأخطاء كلها !! رجاء احد يساعدني الأخـطـاء WARNING: radar_sistem\s.lua:21: Bad argument @ 'createMarker' [Expected number at argument 2, got boolean] WARNING: radar_sistem\s.lua:22: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] WARNING: radar_sistem\s.lua:23: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] WARNING: radar_sistem\s.lua:24: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] WARNING: radar_sistem\s.lua:25: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] WARNING: radar_sistem\s.lua:26: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] WARNING: radar_sistem\s.lua:27: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] WARNING: radar_sistem\s.lua:28: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] WARNING: radar_sistem\s.lua:29: Bad argument @ 'getElementData' [Expected element at argument 1, got boolean] WARNING: radar_sistem\s.lua:30: Bad argument @ 'addEventHandler' [Expected element at argument 2, got boolean] WARNING: radar_sistem\s.lua:48: Bad argument @ 'getElementType' [Expected element at argument 1, got boolean] ألـكــود --Server enableBlips = get("enableSpeedcamBlips") thisResource = getResourceRootElement(getThisResource()) function createSpeedFunc() local speedcams = getElementsByType ("speedcam", resourceRoot) num=0 id=0 speedcam = { } speedBlip = { } speedID = { } for key,val in ipairs(speedcams) do num=num+1 id=id+1 speedX = getElementData(val, "x") speedY = getElementData(val, "y") speedZ = getElementData(val, "z") size = getElementData(val, "size") ticketCost = getElementData(val, "ticketCost") requiredSpeed = getElementData(val, "requiredSpeed") speedcam[num] = createMarker (speedX, speedY, speedZ, "cylinder", size, 255, 200, 0, 0, root) setElementData(speedcam[num], "id", tonumber(id), true) setElementData(speedcam[num], "speedcam", speedcam[num]) setElementData(speedcam[num], "x", speedX) setElementData(speedcam[num], "y", speedY) setElementData(speedcam[num], "z", speedZ) setElementData(speedcam[num], "ticketCost", ticketCost) setElementData(speedcam[num], "requiredSpeed", requiredSpeed) speedcamData = getElementData(speedcam[num], "speedcam") addEventHandler("onMarkerHit", speedcamData, triggerFlash:~) if enableBlips == "true" then for m,n in ipairs(speedcam) do local blip = createBlip(speedX, speedY, speedZ, 0, 1, 255, 0, 0, 255, 0, 70, getRootElement()) setBlipVisibleDistance(blip, 200) end end end local players = getElementsByType("player") for theKey, thePlayer in ipairs(players) do outputChatBox("!!!!"..tonumber(id).." !!!!", thePlayer, 255, 200, 0, false) end end addEventHandler("onResourceStart", resourceRoot, createSpeedFunc) function triggerFlash:~(hitElement) if (getElementType(hitElement) == "player" ) then local vehicle = getPedOccupiedVehicle(hitElement) if (getElementType(vehicle) == "vehicle" ) then local driver = getVehicleOccupant ( vehicle ) if (driver) then local speedx, speedy, speedz = getElementVelocity(vehicle) local cX, cY, cZ = getElementPosition(vehicle) local playerAcc = getPlayerAccount(hitElement) local pWanted = getPlayerWantedLevel(hitElement) local pMoney = getPlayerMoney(hitElement) actualSpeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) mph = math.floor(actualSpeed * 111.847) if (mph >= tonumber(requiredSpeed) ) and (getPlayerWantedLevel(hitElement) <=6 ) then if (pMoney >= tonumber(ticketCost) ) then outputChatBox("!!!!!!"..requiredSpeed.." Km/h)", hitElement, 255, 200, 0, false) outputChatBox("!!!!: "..mph.." Km/h", hitElement, 255, 200, 0, false) outputChatBox("!! "..ticketCost.."$", hitElement, 255, 200, 0, false) setTimer(triggerClientEvent, 100, 1, "showPicture", hitElement) takePlayerMoney(hitElement, tonumber(ticketCost)) fadeCamera(hitElement, false, 0.5, 255, 255, 255) setTimer(fadeCamera, 100, 1, hitElement, true, 1.0, 255, 255, 255) elseif (pMoney <=tonumber(ticketCost) ) and (getPlayerWantedLevel(hitElement) <=6 ) then setPlayerWantedLevel(hitElement, math.min(6, getPlayerWantedLevel(hitElement) + 2)) setTimer(triggerClientEvent, 100, 1, "showPicture", hitElement) outputChatBox(" !!! "..requiredSpeed.." Km/h)", hitElement, 255, 200, 0, false) outputChatBox("! : "..mph.." Km/h", hitElement, 255, 200, 0, false) outputChatBox("!!!!!!!!!!", hitElement, 255, 0, 0, false) outputChatBox("!! : "..ticketCost.."$", hitElement, 255, 0, 0, false) outputChatBox("!!: "..getPlayerMoney(hitElement).."$", hitElement, 255, 0, 0, false) fadeCamera(hitElement, false, 0.5, 255, 255, 255) setTimer(fadeCamera, 100, 1, hitElement, true, 1.0, 255, 255, 255) end end end else return end end end Link to comment
Mr.OppS Posted June 12, 2017 Author Share Posted June 12, 2017 ???????????????؟؟؟؟؟؟؟؟؟؟؟؟ Link to comment
iMr.WiFi..! Posted June 12, 2017 Share Posted June 12, 2017 11 hours ago, Mr.OppS said: ???????????????؟؟؟؟؟؟؟؟؟؟؟؟ سوي تحقق انه الجدول مايساوي 0 والمفروض انك ماتسوي لوب على جدول فارغ 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