Jump to content

Firespider

Members
  • Posts

    238
  • Joined

  • Last visited

Everything posted by Firespider

  1. Firespider

    [HELP]

    How can I make a marker on the client side and create a car on the server side when a player enters it?
  2. Firespider

    [HELP]

    I wrote this, but something doesn't work with then, it says an error code
  3. Firespider

    [HELP]

    And how can I make it function as a button, because I guess it doesn't work with my old method
  4. Firespider

    [HELP]

    No, you know, the pads are included in the game and if you click on them, the panel will appear addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld) if (button == "right") and (state == "up") then IsCardShop = true--- end end) That's what I mean Is this also possible with the new code? So I don't mean that if a button is pressed, the panel opens, but if a player clicks on a Ped, the panel opens. Anyway, thanks for the code you sent, I'll try it later. and if everything is true, I have already solved the ped thing
  5. Firespider

    [HELP]

    I mean that if the player clicks on a ped, the menu opens like in my code, this is possible with this code.
  6. Firespider

    [HELP]

    Is it possible to open it with an NPC in the same way?
  7. Firespider

    [HELP]

    I wrote it, sorry*
  8. Firespider

    [HELP]

    Okay, just like that, it won't go away with Ped. Ok, so it won't open with Ped.* I wrote sorry.
  9. Firespider

    [HELP]

    It is not necessary to solve the problem of opening it by pressing the F3 button, but how to calculate the Cy Cx value. And if it is there, the button will light up when you move the cursor over it.
  10. Firespider

    [HELP]

    That way it can be more transparent ocal sx,sy = guiGetScreenSize();--1920,1080 local relx,rely = sx/1920,sy/1080; local cardPed = createPed(1, 337.536, -1358.894, 14.508, 280) local shopWindow = {0.3, 0.25} local IsCardShop = false local money = getPlayerMoney(localPlayer) local Cardlist = { [1] = {411, "Jogosítvány", 1000}, [2] = {482, "Jogosítvány", 10000}, }; function isInBox(x,y,x2,y2) if (isCursorShowing()) then local cX, cY = getCursorPosition(); if ( (cX >= x) and (cY >= y) and (cX <= x2) and (cY <= y2) ) then return true; else return false; end end end local Buttoncolors = { [1] = tocolor(49, 230, 32, 250); } addEventHandler("onClientRender", root, function() if (IsCardShop) then dxDrawRectangle(sx*.35, sy*.35, sx*.30, sy*.05, tocolor(0, 0, 0, 200))--Fejléc dxDrawText("Jogosítvány", sx*.50, sy*.035, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawRectangle(sx*.35, sy*.40, sx*.30, sy*.20, tocolor(30, 40, 50, 250))-- panel dxDrawRectangle(sx*.40, sy*.47, sx*.06, sy*.05, tocolor(49, 230, 32, 250))--gomb1 dxDrawText("Megvétel", sx*.36, sy*.27, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Legális 1000$", sx*.36, sy*.19, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawRectangle(sx*0.55, sy*0.47, sx*0.06, sy*0.05, Buttoncolors[1])--gomb1 dxDrawText("Megvétel", sx*.66, sy*.27, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Ilegális 10000$", sx*.66, sy*.19, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Összeged: "..money.."$", sx*.52, sy*.40, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat end end ); bindKey("BACKSPACE","down",function() if IsCardShop == true then IsCardShop = false end end ) function showCard(index) end addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld) if (button == "right") and (state == "up") then 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 ------------ color = tocolor(230, 32, 250, 180) --Here is the color of the button I made ------------ dxDrawRectangle(sx*.40, sy*.47, sx*.06, sy*.05, color1 or color, false) --gombl ------------ if isMouseInPosition(sx*.40, sy*.47, sx*.06, sy*.05) then color1 = tocolor(88, 0, 0, 50) --And here you put any color when the mouse touches the button, a color appears else color1 = color end
  11. Firespider

    [HELP]

    Doesn't working Doesn't working
  12. Firespider

    [HELP]

    Worthless Cynomys 4 nappal ezelőtt X2 and Y2 are the x of panel + panel size and y of panel + panel size X2 and Y2 are the x of panel + panel size and y of panel + panel size I don't understand what with what.
  13. Firespider

    [HELP]

    Is OnCursorMove not good? OnClientCursorMove* Doesn't working
  14. Firespider

    [HELP]

    There is a function from there, I would like to do it so that if you move the mouse to that coordinate, the button will light up, but I don't know how to calculate the coordinate so that it is "gomb1" The function I use to calculate the coordinates is IsInBox
  15. Firespider

    [HELP]

    Thanks, but is there anything else you can help me with?
  16. Firespider

    [HELP]

    Thanks, but is there anything else you can help me with?
  17. Firespider

    [HELP]

    function GetMyPosition() local x,y,z = getElementPosition(localPlayer) local int = getElementInterior(localPlayer) local dim = getElementDimension(localPlayer) local skin = getElementModel(localPlayer) if not skin or not skin == 1 then outputChatBox("Nincs engedélyed hozzá") return end setClipboard(x..", "..y..", "..z.." "..int..", "..dim) outputChatBox("Kordinátád sikeressen kimásolva a vágólapra ") end addCommandHandler("GetMyPos", GetMyPosition, false, false) function alert () local name = getPlayerName(localPlayer) local sound = playSound("alert.mp3") -- Play wasted.mp3 from the sounds folder setSoundVolume(sound, 1) -- Set the sound volume to 50% if not skin or not skin == 1 then outputChatBox("Nincs engedélyed hozzá") return end outputChatBox("HLR felhivás "..name.." megnyitotta váróját! Lehet jönni ha bármi segítség kell!") end addCommandHandler("alert", alert, false, false) function duty () setElementModel(thePalyer, 266) end addCommandHandler("aduty", duty, false, false)
  18. Firespider

    [HELP]

    I wrote client side
  19. Firespider

    [HELP]

    Hello, I would like to solve the problem so that the car just explodes and does not explode
×
×
  • Create New...