
undefined
Members-
Posts
500 -
Joined
-
Last visited
Everything posted by undefined
-
Thank you Max+ Thank you Blaawee
-
Hi guys. I have a question. How to give animation the dx elements? Thnx...
-
Thnx but im fixed it.
-
Im fixed it myself. My problem is in the open/close gui elements. Between "onClientVehicleStartExit" and "onClientVehicleExit" are considered a player in the car. Im added the onVehicleStartExit = false in the "onClientVehicleStartExit" event. And im added the open/close function's if onVehicleStartExit then guiSetVisible(...) ..... Thanks for your help...
-
When the player start exit to vehicle, the gui elements must be visible false. But only the visible false chkEngine and chkKilit...
-
My part gui code: repairVehicleButton = guiCreateButton(91, 241, 67, 22, "Tamir Et", false, freeroamWindow) guiSetFont(repairVehicleButton, "default-bold-small") flipVehicleButton = guiCreateButton(167, 241, 67, 22, "Çevir", false, freeroamWindow) guiSetFont(flipVehicleButton, "default-bold-small") upgradeVehicleButton = guiCreateButton(14, 269, 67, 22, "Yükselt", false, freeroamWindow) guiSetFont(upgradeVehicleButton, "default-bold-small") colorVehicleButton = guiCreateButton(91, 269, 67, 22, "Renk", false, freeroamWindow) guiSetFont(colorVehicleButton, "default-bold-small") paintjobVehicleButton = guiCreateButton(168, 269, 67, 22, "Boya", false, freeroamWindow) guiSetFont(paintjobVehicleButton, "default-bold-small") chkLights = guiCreateCheckBox(14, 301, 77, 15, "Far", false, false, freeroamWindow) chkKilit = guiCreateCheckBox(14, 319, 77, 15, "Kilit", false, false, freeroamWindow) chkEngine = guiCreateCheckBox(157, 301, 77, 15, "Motor", true, false, freeroamWindow) Help pls...
-
But the problem is not in the other code. When the im change "onClientVehicleStartExit" to "onClientVehicleExit" then it's work perfectly. Help...
-
Hey All. I have a problem on my freeroam and i dont understand this problem. When the player entered vehicle, the gui elements visible true but when the player left vehicle then chkEngine and chkKilit is visible false but the other gui elements not visible false. It's not give error or warning on debug. My enter code: addEventHandler("onClientVehicleEnter", getRootElement(), function( thePlayer, seat ) if thePlayer == gMe then local vehicle = getPedOccupiedVehicle(thePlayer) if not vehicle then return end guiSetVisible(repairVehicleButton, true) guiSetVisible(flipVehicleButton, true) guiSetVisible(upgradeVehicleButton, true) guiSetVisible(colorVehicleButton, true) guiSetVisible(paintjobVehicleButton, true) guiSetVisible(chkLights, true) if seat == 0 then guiSetVisible(chkEngine, true) guiSetVisible(chkKilit, true) end if getVehicleOverrideLights ( vehicle ) == 2 then guiCheckBoxSetSelected(chkLights, true) else guiCheckBoxSetSelected(chkLights, false) end end end) My left code: addEventHandler("onClientVehicleStartExit", getRootElement(), function( thePlayer, seat, door ) if thePlayer == gMe then guiCheckBoxSetSelected(chkLights, false) guiCheckBoxSetSelected(chkKilit, false) guiSetVisible(vehPaintjobWindow, false) guiSetVisible(repairVehicleButton, false) guiSetVisible(flipVehicleButton, false) guiSetVisible(upgradeVehicleButton, false) guiSetVisible(colorVehicleButton, false) guiSetVisible(paintjobVehicleButton, false) guiSetVisible(chkLights, false) guiSetVisible(chkKilit, false) guiSetVisible(chkEngine, false) triggerServerEvent("vehPaintjobWindowAyar", localPlayer) guiSetVisible(vehUpgradeWindow, false) triggerServerEvent("vehUpgradeWindowAyar", localPlayer) if seat == 0 then local vehicle = getPedOccupiedVehicle(thePlayer) setVehicleEngineState ( vehicle, false ) triggerServerEvent("setLockState", localPlayer, false) end end end) Note: gMe = getLocalPlayer()
-
Try this. setPedAnimation(playerElement, "category", "name") setTimer(function() setPedAnimation(playerElement) end, 3000, 1)
-
Try this. local marker1 = createMarker(x, y, z, "cylinder", 2, 255, 255, 255, 255) function marker1hit ( thePlayer ) outputChatBox ("test", thePlayer, 255, 255, 255) end addEventHandler("onClientMarkerHit", marker1, marker1hit)
-
It's not give error or warning on debug. And...
-
Hi guys. Im get the this error: Client-Side ["test_c.lua"] local sx, sy = guiGetScreenSize() addEvent("resourceDownloading", true) addEventHandler("resourceDownloading", getRootElement(), function () addEventHandler("onClientRender", root, resourceDownloading) end) function resourceDownloading() dxDrawText("Resource is downloading", 0, 0, sx, sy, tocolor(255, 255, 255, 255), (2.00/1366)*sx, (2.00/768)*sy, "bankgothic", "center", "center", false, false, true, false, false) end resourceDownloadingTimer = setTimer(function() if not isTransferBoxActive() then if removeEventHandler("onClientRender", root, resourceDownloading) then end if isTimer(resourceDownloadingTimer) then killTimer(resourceDownloadingTimer) end end end, 1000, 0) Server-Side ["test_s.lua"] addEventHandler("onPlayerJoin", getRootElement(), function() triggerClientEvent(source, "resourceDownloading", source) end) meta.xml "ZoRRoM^" type="script" /> Where is the problem?
-
It's remove the upgrades for 1 times. It's not work.
-
My new code: addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function() for key,veh in ipairs(getElementsByType ( "vehicle" )) do if not getElementData(veh, "doNotRespawn") then toggleVehicleRespawn ( veh, true ) setVehicleRespawnDelay ( veh, 10000) setVehicleIdleRespawnDelay ( veh, 60000) local color1, color2, color3, color4 = getVehicleColor ( veh ) setVehicleColor(veh, color1, color2, color3, color4) setVehiclePlateText(veh, "Saruhan") setElementData(veh, "vehPaintJob", getVehiclePaintjob(veh)) setElementData(veh, "vehColor1", color1) setElementData(veh, "vehColor2", color2) setElementData(veh, "vehColor3", color3) setElementData(veh, "vehColor4", color4) end end end) addEventHandler ( "onVehicleRespawn", getRootElement(), function( exploded ) if not getElementData(veh, "doNotRespawn") then local vehPaintJob = getElementData(veh, "vehPaintJob") local color1 = getElementData(veh, "vehColor1") local color2 = getElementData(veh, "vehColor2") local color3 = getElementData(veh, "vehColor3") local color4 = getElementData(veh, "vehColor4") setVehiclePaintjob(veh, vehPaintJob) setVehicleColor(veh, color1, color2, color3, color4) setVehicleEngineState(veh, false) setVehicleOverrideLights (veh, 1) setVehicleLocked(veh, false) setVehiclePlateText(veh, "Saruhan") setVehicleDoorOpenRatio(veh, 0, 0, 0.5) setVehicleDoorOpenRatio(veh, 1, 0, 0.5) setVehicleDoorOpenRatio(veh, 2, 0, 0.5) setVehicleDoorOpenRatio(veh, 3, 0, 0.5) setVehicleDoorOpenRatio(veh, 4, 0, 0.5) setVehicleDoorOpenRatio(veh, 5, 0, 0.5) for i,upgrade in ipairs(getVehicleCompatibleUpgrades(veh)) do removeVehicleUpgrade (veh, upgrade) end end end)
-
Oh sry. My english is not too good. for i=1000,1193 do removeVehicleUpgrade (source, i) end and setVehicleOverrideLights (source, 1)
-
Ha? I don't understand...
-
It's not give warning or error on debugscript.
-
Hi guys. Im work on the vehicle respawner and i have a problem. When the respawn vehicle, not remove the upgrades. My code: addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function() for key,veh in ipairs(getElementsByType ("vehicle")) do if not getElementData(veh, "doNotRespawn") then toggleVehicleRespawn (veh, true) setVehicleRespawnDelay (veh, 10000) setVehicleIdleRespawnDelay (veh, 60000) local color1, color2, color3, color4 = getVehicleColor (veh) setVehicleColor(veh, color1, color2, color3, color4) setVehiclePlateText(veh, "Saruhan") setElementData(veh, "vehPaintJob", getVehiclePaintjob(veh)) setElementData(veh, "vehColor1", color1) setElementData(veh, "vehColor2", color2) setElementData(veh, "vehColor3", color3) setElementData(veh, "vehColor4", color4) end end end) addEventHandler ( "onVehicleRespawn", getRootElement(), function( exploded ) if not getElementData(source, "doNotRespawn") then local vehPaintJob = getElementData(source, "vehPaintJob") local color1 = getElementData(source, "vehColor1") local color2 = getElementData(source, "vehColor2") local color3 = getElementData(source, "vehColor3") local color4 = getElementData(source, "vehColor4") setVehiclePaintjob(source, vehPaintJob) setVehicleColor(source, color1, color2, color3, color4) setVehicleEngineState(source, false) setVehicleOverrideLights (source, 1) setVehicleLocked(source, false) setVehiclePlateText(source, "Saruhan") setVehicleDoorOpenRatio(source, 0, 0, 0.5) setVehicleDoorOpenRatio(source, 1, 0, 0.5) setVehicleDoorOpenRatio(source, 2, 0, 0.5) setVehicleDoorOpenRatio(source, 3, 0, 0.5) setVehicleDoorOpenRatio(source, 4, 0, 0.5) setVehicleDoorOpenRatio(source, 5, 0, 0.5) for i=1000,1193 do removeVehicleUpgrade (source, i) end end end) Where is the problem?
-
Thank you ccw. I did not realize. It's solved...