Jump to content

Firespider

Members
  • Posts

    241
  • Joined

  • Last visited

Everything posted by Firespider

  1. @SciptNovato Ok, I have it, I made it so that it works when you press it, but it doesn't flash when you move the cursor over it, can you help me with this
  2. Hello! I have a small problem, I want to create a menu, but for some reason the button does not flash and does not work, and it still flashes first, could you help? local sx, sy = guiGetScreenSize() local relx,rely = sx/1920,sy/1080; local DutyPanel = false local MenuPoints = {00.35 ,00.20} color1 = tocolor(30, 40, 50, 255) addEventHandler("onClientRender", root, function() if (DutyPanel) then if not (getElementData(localPlayer, "Duty")) then dxDrawRectangle(sx*(MenuPoints[1]), sy*(MenuPoints[2]), sx*.3, sy*.5, tocolor(50, 60, 70, 230))-- Panel dxDrawRectangle(sx*(MenuPoints[1]), sy*(MenuPoints[2]), sx*.3, sy*0.08, tocolor(20, 30, 40, 255))-- Panel fejléc dxDrawRectangle(sx*.4, sy*.4 , sx*.2, sy*0.080, color1) dxDrawText("Duty Felvételi Panel", sx*.800, sy*.4 , sx*.2, sy*0.080, tocolor(200, 200, 200, 255), relx*4, rely*4, "default-bold", "center", "center", false, false, false) dxDrawText("Duty Felvétel", sx*.800, sy*0.80 , sx*.2, sy*0.080, tocolor(200, 200, 200, 255), relx*4, rely*4, "default-bold", "center", "center", false, false, false) else dxDrawRectangle(sx*(MenuPoints[1]), sy*(MenuPoints[2]), sx*.3, sy*.5, tocolor(50, 60, 70, 230))-- Panel dxDrawRectangle(sx*(MenuPoints[1]), sy*(MenuPoints[2]), sx*.3, sy*0.08, tocolor(20, 30, 40, 255))-- Panel fejléc dxDrawRectangle(sx*.4, sy*.4 , sx*.2, sy*0.080, color1) dxDrawText("Duty Felvételi Panel", sx*.800, sy*.4 , sx*.2, sy*0.080, tocolor(200, 200, 200, 255), relx*4, rely*4, "default-bold", "center", "center", false, false, false) dxDrawText("Duty leadása", sx*.800, sy*0.80 , sx*.2, sy*0.080, tocolor(200, 200, 200, 255), relx*4, rely*4, "default-bold", "center", "center", false, false, false) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end ---------- if isMouseInPosition(sx*.4, sy*.4 , sx*.2, sy*0.080) then color1 = tocolor(80, 90, 100, 255) else color1 = tocolor(30, 40, 50, 255) end addEventHandler("onClientClick", root, function(button, state) if (DutyPanel) then if ( button == "left" and state == "down" ) then if isMouseInPosition(sx*.4, sy*.4 , sx*.2, sy*0.080) then triggerServerEvent("Dutyon", root) DutyPanel = false end end end end ) end end end ) addEvent("OpenDutyPanel", true) addEventHandler("OpenDutyPanel", root, function() if not (DutyPanel) then DutyPanel = true else outputChatBox("#961f17[RENDSZER]: #ffffffMár menűbe vagy!", 0, 0, 0, true) end end ) function ShowCursor() if not isCursorShowing() then showCursor(true) else showCursor(false) end end bindKey("m", "Down", ShowCursor)
  3. Firespider

    [HELP]

    @Addlibs I have a problem, it's like a car shop and it's supposed to put the very first car down, but I don't know where the beginning of the whole thing starts, so to speak, because English is not my native language and I might have misread something. So, so to speak, which is the very first function that should be used in this situation. Thanks in advance for your answer!
  4. Firespider

    [HELP]

    Hello! I have another problem I want to solve, if we press the arrow on the right, it goes to the other car, but for some reason it doesn't go to the fourth one. bindKey("arrow_r", "Down", function() destroyElement (Veh1) if (car == 1) then local Veh2 = createVehicle(411, 2154.45996, -1153.21362, 23.87550) bindKey("arrow_r", "Down", function() destroyElement (Veh2) car = 1+1 end ) if (car == 2) then local Veh3 = createVehicle(478, 2154.45996, -1153.21362, 23.87550) bindKey("arrow_r", "Down", function() destroyElement (Veh3) car = 1+2 end ) if (car == 3) then createVehicle(240, 2154.45996, -1153.21362, 23.87550) end end end end )
  5. Hello! I had a problem and I would like to solve it if the player presses it backspace on the keyboard, the camera view is restored, but I can't solve it. I tried Destroy Element, but it's not good. Thanks in advance if anyone can help! function OpenWindow() if (page == 1) then setPlayerHudComponentVisible("all", false) showChat(false) camera = setCameraMatrix( 2149.77148, -1148.25977, 24.41226) Veh1 = createVehicle(402, 2154.45996, -1153.21362, 23.87550) bindKey("BACKSPACE", "Down", function() destroyElement(camera) end) end end
  6. Doesn't working. But thanks for that But it works, I just didn't delete a part, thanks.
  7. Hello! This part of the script doesn't work for some reason, but I don't know why I don't need a little help. Do not issue any error codes. addEventHandler("onVehicleExit", resourceRoot, function(player, seat) if (player == client) then local vehicle = getPedOccupiedVehicle(client) if (vehicle) then if (vehicle == getElementData(client, "Jobveh")) then if (seat == 0) then outputChatBox("#1db8b5[Munka]#549c6bSikeressen leadtad a munka járművedet", client, 0, 0, 0, true) end end end end end )
  8. Hello! Need some help. I'm writing a work script and it doesn't work because if you go into the delivery spot, the car freezes. Because now the car just goes through the marker --Client side local Storage = {false, false} local deliveryspot = {false, false} local FinishJob = {false, false} local DPoint = { [1] = {1648, -2249, 13},---airport -> Repülőtér [2] = {2190, -2266, 13},---docks -> Dokkok [3] = {1369, -1889, 13},---Verdant Bluffs LS [4] = {1043, -1872, 13}, [5] = {857, -1365, 13}, } local Anyagok = { [1] = {"Fém"}, [2] = {"Deszka"}, [3] = {"Vas rúd"}, [4] = {"Nikecell"}, } function WorkStart() Storage[1] = createMarker(2784, -2455, 13, "cylinder", 10, 10, 160, 0) Storage[2] = createBlip(2784, -2455, 13, 51, 40, 160, 0, 0) outputChatBox("#1db8b5[Munka]#549c6bMenj el a raktárba és vedd fel rendelést", 0, 0, 0, true) end addEventHandler("onClientVehicleEnter", root, function (thePlayer, seat) if (source == getElementData(localPlayer, "Jobveh")) then if (seat == 0) then if not (Storage[1]) then WorkStart() end if not (FinishJob[1]) then FinishJob[1] = createMarker(2745, -2431, 13, "cylinder", 10, 20, 160, 10) FinishJob[2] = createBlip(2745, -2431, 13, 11, 2, 51, 10, 0, 0, 0, 255) end end end end ) addEventHandler("onClientMarkerHit", resourceRoot, function(hitPlayer, mDim) if (mDim) then if (source == Storage[1]) then if (hitPlayer == localPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if (vehicle) then if (vehicle == getElementData(hitPlayer, "Jobveh")) then setElementFrozen(localPlayer,true) setElementFrozen(vehicle, true) setTimer(function() setElementFrozen(vehicle, false) setElementFrozen(localPlayer, false) destroyElement(Storage[1]) destroyElement(Storage[2]) local index = math.random(1, #DPoint) deliveryspot[1] = createMarker(DPoint[index][1], DPoint[index][2], DPoint[index][3], "cylinder", 15, 20, 160, 0) deliveryspot[2] = createBlip(DPoint[index][1], DPoint[index][2], DPoint[index][3], 51, 10, 0, 0, 0, 255) outputChatBox("#1db8b5[Munka]#549c6bSikeressen felvetted a rendelést menj és szállítsd ki", 0, 0, 0, true) if (index == 1) then outputChatBox("#1db8b5[Munka]#549c6bHely:Reptér.", 0, 0, 0, true) end if (index == 2) then outputChatBox("#1db8b5[Munka]#549c6bHely:Dokkok.", 0, 0, 0, true) end if (index == 3) then outputChatBox("#1db8b5[Munka]#549c6bHely:Verdant Bluffs LS.", 0, 0, 0, true) end end, math.random(3000, 5000), 1) end end end if (source == deliveryspot[1]) then if (hitPlayer == localPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if (vehicle) then if (vehicle == getElementData(hitPlayer, "Jobveh")) then setElementFrozen(localPlayer,true) setElementFrozen(vehicle, true) setTimer(function() setElementFrozen(vehicle, false) setElementFrozen(localPlayer, false) destroyElement(deliveryspot[1]) destroyElement(deliveryspot[2]) WorkStart(); end, math.random(3000, 5000), 1) end end end end end end end )
  9. Ezt a problémát megoldottam. A másik probléma az lenne hogy akkor is ki írja hogy már van járműved amikor nincs.
  10. Sziasztok! Írnék egy munka kódot de valami baj van és nem értem mi a baj. ---Server side for i, player in ipairs(getElementsByType("player")) do setElementData(player, "Jobveh", false) end local vehpos = { [1] = {2742.76416, -2468.74683, 13.64844}, [2] = {2742.69360, -2460.06079, 13.64844}, }; local Deliverypos = { } local Marker = createMarker(2744.14453, -2453.91431, 13.86226, "cylinder", 3, 255) local VehIDJobs = {609, 499}, addEventHandler("onMarkerHit", resourceRoot, function(hitElement, mDim) if (mDim) then if (source == Marker) then if (getElementType(hitElement) == "player") then if not (getElementType(HitElement, "Jobveh")) then local Veh for i, spot in pairs(vehpos) do createVehicle(609, spot[1], spot[2], spot[3]) setElementData(hitElement, "Jobveh", Jobveh) veh = true break; end end if (veh) then end end end end end end
  11. Firespider

    [HELP]

    Isn't that the code?
  12. Firespider

    [HELP]

    He already solved that For some reason, he won't take money even if he has enough.
  13. Firespider

    [HELP]

    Why doesn't the button light up when you move the mouse over it? And if they click on him, why doesn't he take the money if he has enough. local sx,sy = guiGetScreenSize();--1920,1080 local relx,rely = sx/1920,sy/1080; local isCardShop = false local money = getPlayerMoney(localPlayer) local Cardlist = { [1] = {411, "Cég1", 100}, }; color = tocolor(41, 173, 21, 255) addEventHandler("onClientRender", root, function() if (isCardShop) then ---Rajz dxDrawRectangle(sx*.25, sy*.20, sx*.50, sy*.05, tocolor(0, 0, 0, 200))--Fejléc dxDrawRectangle(sx*.250, sy*.25, sx*.50, sy*.7, tocolor(30, 40, 50, 200))--Menű dxDrawRectangle(sx*.450, sy*.50, sx*.10, sy*.07, color1 or color)--Gomb ---Feliratok dxDrawText("Cég menű", sx*.50, sy*.090, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Cégek:", sx*.50, sy*.20, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Kamionos cég", sx*.50, sy*.25, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Kamionos cég", sx*.50, sy*.70, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("50000$", sx*.50, sy*.75, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat end end ); bindKey("F5","down",function() if isCardShop == true then isCardShop = false else isCardShop = true end end) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end ---------- if isMouseInPosition(sx*.450, sy*.50, sx*.10, sy*.07) then color1 = tocolor(88, 0, 0, 50) else color1 = color end ----------- function OpenWindow() isCardShop = not isCardShop if removeEventHandler("onClientRender", root, Panel) then removeEventHandler("onClientRender", root, Panel) showCursor(false) else addEventHandler("onClientRender", root, Panel) showCursor(true) end end bindKey("F3", "down", OpenWindow) ---------- addEventHandler("onClientClick", root, function(button,state) if isCardShop == true then if ( button == "left" and state == "down" ) then if isMouseInPosition(sx*.450, sy*.50, sx*.10, sy*.07) then local yourMoney = getPlayerMoney() if ( yourMoney <= 100) then takePlayerMoney(100) else outputChatBox("Nincs elég pénzed",255,0,0,true) --outputChatBox("Menj be a Markerbe a vizsga elkezdéséhez") end end end end end) ----------
  14. Sziasztok! Az lenne a probléma van egy szerverem. És amikor feljönnek lassan tölti be a szervert. Erre van megoldás?
  15. Firespider

    [HELP]

    I don't know what the problem is with the script addEventHandler ("onPlayerCommand", getRootElement(), function (cmd ) local serial = getPlayerSerial ( source ) if not (devSerials[serial] ) then if (devCommands[cmd]) then outputChatBox (exports.fv_engine:getServerSyntax("Admin","red").."Ezt a parancsot nem használhatod!",source,255,255,255,true); cancelEvent(); end end if devSerials[serial] then if (devCommands[cmd]) then sendMessageToAdmin(source, hexColor..getAdminName(source)..white.." használta a(z) "..hexColor..cmd..white.." parancsot!", 5); exports['fv_logs']:createLog(cmd, getAdminName(source).." használta a(z) " ..cmd.." parancsot!",source); end end end);
  16. Firespider

    [HELP]

    But I think fv_logs starts sooner
  17. Firespider

    [HELP]

    I don't know why you want the log resource to start sooner, but I don't know how ACL starts it
  18. Firespider

    [HELP]

    I do not get what you want
  19. Firespider

    [HELP]

    I just don't understand what's wrong.
×
×
  • Create New...