Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  1. Do you mean how to get the width and the height of that GUI?
  2. Those are variables, you can type in 0-1 if you have that true at the end, if it's false, you can enter a number which will represent pixels.
  3. NeXuS™

    Wasted script

    You'll have to use the onPedWasted event and, depends on how you want to do it, you can use GUI, or dxElements.
  4. You'll have to make variables if you want to use them like that, but you can easily use it without addressing it to the memory. vehicleT = getElementsByType("vehicle") for i, k in pairs(vehicleT) do outputChatBox(getElementModel(k)) end for i, k in ipairs(getElementsByType("vehicle")) do outputChatBox(getElementModel(k)) end Both'll work.
  5. I've tested it on my server, and it worked fine. And you do realize that the function gets called, meaning that you have something wrong in your code, as mine works aswell. addEventHandler("onClientVehicleDamage", getRootElement(), function(_, _, vehDmg) setState = getElementHealth(source)-vehDmg <= 250 and setVehicleDamageProof(source, true) or false outputChatBox("isProof: " .. tostring(isVehicleDamageProof(source))) end) Done.
  6. NeXuS™

    Just a question

    I suppose mx, my, mz, tarx, tary, tarz are the camera matrix, and then xyz is the spawn position.
  7. NeXuS™

    Just a question

    Where does it say that you have to use those args? Use the spawnPlayer function.
  8. NeXuS™

    Just a question

    What do you mean? An element's position? Why do you have target positions? Btw, to get the current position of an element, use getElementPosition, for the rotation, getElementRotation.
  9. Because your function is not even functioning as a function. To create a function, you have to use parenthesis (), and then you have args in that function. Check the wiki page of the onClientClick event for further info about those args.
  10. teleportDelay = setTimer (function() for i,p in ipairs(players) do outputChatBox ("#FFFFFFIt is not recommended to jump in a moving plane. If you are stuck up top, use the #2590CE/stuck#FFFFFF command!", p, 255, 255, 255, true) setElementPosition (p, 36.48424911499, -1532.5826416016, 351.02972412109) setPedRotation (p, 90) end end, 20000, 1) You put the setTimer's args into the forcycle's end.
  11. You can use the getElementModel function to determine the element's object ID.
  12. addEventHandler("onClientVehicleDamage", getRootElement(), function() setState = getElementHealth(source) <= 250 and setVehicleDamageProof(source, true) or setVehicleDamageProof(source, false) end) Totally unnecessary code removed.
  13. You'll have to apply the custom textures for each individual player.
  14. If you are on client-side, you can use onClientClick event which has an arg to describe the clicked element. If you are on server-side, you can use onElementClicked event.
  15. I'm not sure if you can do it, but just try it as you'd do with a dxText. Btw, why is dxtext out of your case? Ahh, nvm, it can't be done like that. Did you try using the guiSetPosition function?
  16. What you could try is creating a rendertarget, drawing the labels in that rendertarget and then drawing the rendertarget on your screen with an offset on the Y axis.
  17. Alright. Do me a favor. If you haven't updated your code with mine, do it now (which has the outputs in it). If you have done the update, go ahead and join your server and blow your vehicle up. After it blew up, open your console.log file and tell us whats inside it.
  18. @Krazy, can you give us a little bit more details? When does the game crash? Instantly after joining the server?
  19. Did anyone else experience this kind of crash with your script?
  20. Your log is not your logfile.txt, console.log if you have not started the game since it crashed.
  21. What you can try to do is debug where the game crashes. addEventHandler("onClientVehicleCollision", root, function(collider,force, bodyPart, x, y, z, nx, ny, nz) outputChatBox("Function called, crashed before getting player veh") if (source == getPedOccupiedVehicle(localPlayer)) then outputChatBox("Got player veh, crashed before checking if it has a collider or the veh is blown up") if (collider) and not isVehicleBlown(source) then outputChatBox("Checked if it has a collider or the veh is blown up, crashed before fixVeh") fixVehicle(source) outputChatBox("Got fixVeh and crashed") end end end ) Try this one and once it crashes check your logfile.
  22. requestBrowserDomains({"http://25.21.228.242/"}) function startDownload() fetchRemote("http://25.21.228.242/all/car.txd", callBack, "", false) end startDownload() function callBack(rData, errno) if errno == 0 then -- Do something end end Try this.
  23. Wrong section mate. The forum has a section called Looking for staff, and its purpose is exactly what you are trying to do here. Before posting there, read the rules in that section.
×
×
  • Create New...