Jump to content

Kelly003

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by Kelly003

  1. Kelly003

    row

    Kenix I know it, but I don't know what is the function to do it.
  2. Kelly003

    row

    how to do that if no row is selected, nothing is done, and if row 1 is selected, it performs the first function (already written by me) and if we select row 2, it performs the second function?
  3. Kelly003

    radar

    Is there any way to make a radar without textures or to render textures to the radar?
  4. Kelly003

    ghost zone

    When you get into these cuboids, nothing works code: local zones= { {-2411.49, -608.29, 131.62, 18.33, 12.49, 1.92}, {-2430.09, -607.45, 131.56, 5.55, 7.24, 1.90}, } for i,v in ipairs(zones) do createColCuboid(v[1], v[2], v[3], v[4], v[5], v[6]) end addEventHandler("onColShapeHit", zones, function(element) if getElementType(element) == "ped" or getElementType(element) == "player" or getElementType(element) == "vehicle" then if getElementAlpha(element) ~= 255 then setElementAlpha(element, 130) setElementCollisionsEnabled(element, false) end end end) addEventHandler("onColShapeHit", zones, function(element) if getElementType(element) == "ped" or getElementType(element) == "player" or getElementType(element) == "vehicle" then if getElementAlpha(element) ~= 130 then setElementAlpha(element, 255) setElementCollisionsEnabled(element, true) end end end)
  5. I would like to make zones in sf that can be captured while in a criminal organization. I would like it to work so that you need a spray to repaint the graffiti which is repainted 10 seconds and then the zone has a cooldown of 10 minutes not to bother it and every 10 minutes from the zone the organization earns money. I do not know where to start And the person who took over the zone gets $ 500 and the people from this organization who were in the zone that was taken over get $ 250
  6. There is no error and nothing is created
  7. how to do random vehicle creation in loop? i tried like this and it doesn't work: server side local id = { {481}, {462}, {509}, } local points = { {-1980.59,306.16,35.17}, {-1981.31,299.08,35.17}, } for _,v in pairs(points) do createVehicle(math.random(2, #id), v[1], v[2], v[3]) end
  8. I want to do a gunshop and I have a few buttons done, but if I click on the first button, it gives me ak with 60 ammo and if I click on the second button, it gives me a m4 with 120 ammo I want to do a gunshop and I have a few buttons done, but if I click on the first button, it gives me ak with 60 ammo and if I click on the second button, it gives me a m4 with 120 ammo
  9. how to add a weapon via event onClientClick? I know it needs to be done with a server trigger but I don't know how to do it. I want to do so that when I click on a given point, she gives a deal with 60 ammo and if I click on the second point, she gives ak47
  10. Kelly003

    get upgrade

    How to check if there is an upgrade in the car, if it is not, install it, and if it is, do not install it?
  11. I already did it myself, but thanks for the answer anyway
  12. I do a healing system and I checked the amount of cash with me and when you have a certain amount, it takes it from us and gives you hp. The problem is how to check the amount of hp so that it does not take cash unnecessarily when someone has 100% hp. addEventHandler("onClientClick", root, function(btn, state) if btn == 'left' and state == 'down' then if data.open == true then if isMouseInPosition(screenW * 0.4081, screenH * 0.3932, screenW * 0.1846, screenH * 0.0560) then if getElementHealth(localPlayer) ~= 100 then outputChatBox("Your hp is full!") end if getPlayerMoney(localPlayer)<500 then outputChatBox("No money") else takePlayerMoney(500) setElementHealth(localPlayer, 100) outputChatBox("Transaction completed") end end if isMouseInPosition(screenW * 0.6007, screenH * 0.2943, screenW * 0.0176, screenH * 0.0352) then showGUI() end end end
  13. in the loop is supposed to spin
  14. Neither of these work. subject still not spinning
  15. There is an exported function in xml, but I don't know how to use it in the new file
  16. I want to export a function that rotates the object, this is what the function looks like: function rotateobj() local orx, ory, orz = getElementRotation(obj) setElementRotation(obj, orx, ory, orz+1) end addEventHandler("onClientRender", root, rotateobj) and i want to export this function to another script and i don't know how to do it i tried to do something but i can't get it local obj = createObject(1947, 193.71983, -105.13480, 1.54872-1) exports["rotobj"]:rotateobj()
  17. Hi, how to do something like this when the checkbox is selected in the login panel, it saves the data (login and password)
  18. how to do when I navigate with the button on the button, then it changes the transparency and when the cursor is not on the button, it will return to the usual transparency?
  19. I want to if you click on the fixed button [dx image] then the whole gui turns off. But I don't know how to do it. please help code: function gui() dxDrawImage(screenW * 0.2654, screenH * 0.2057, screenW * 0.4699, screenH * 0.5885, "window.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.3110, screenH * 0.5339, screenW * 0.0956, screenH * 0.1016, "button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- button off dxDrawImage(screenW * 0.5949, screenH * 0.5339, screenW * 0.0956, screenH * 0.1016, "button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- Button on dxDrawText("text ", screenW * 0.3088, screenH * 0.3698, screenW * 0.6904, screenH * 0.4010, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Text", screenW * 0.4029, screenH * 0.4297, screenW * 0.5978, screenH * 0.5716, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Off", screenW * 0.3250, screenH * 0.5586, screenW * 0.3956, screenH * 0.6029, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("On", screenW * 0.6081, screenH * 0.5586, screenW * 0.6787, screenH * 0.6029, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end I tried to do something like this addEventHandler("onClientClick", root, function() if getCursorPosition(screenW * 0.3110, screenH * 0.5339, screenW * 0.0956, screenH * 0.1016) then showCursor(false) removeEventHandler("onClientRender", root, gui) return end end) but not working
  20. I'm learning lua and can do something, but scaling is the biggest problem. Can someone help me scale this? CODE: dxDrawImage(486, 474+offset, 388, 189, "line.png", 0, 0, 0, tocolor(255, 255, 255, alpha), false) dxDrawImage(496, 523+offset, 38, 38, v.type, 0, 0, 0, tocolor(255, 255, 255, alpha), false) dxDrawText(v.txt, 467, 570+offset2, 892, 656, tocolor(255, 255, 255, alpha), 1.00, "default-bold", "center", "center", false, false, false, false, false)
  21. I have a problem with how to loop and setElementRotation to keep the object rotating. I would like to ask you to send me a ready code how to do it because I am a beginner code: local obj=createObject(1947,191.14917, -107.59645, 1.54682-1)
×
×
  • Create New...