Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  1. function setData(tab) guiGridListClear(charGrid) for i=1,#tab do local row = guiGridListAddRow ( charGrid ) guiGridListSetItemText ( charGrid, row, 1, tab[i]['id'] , false, false ) guiGridListSetItemText ( charGrid, row, 2, tab[i]['name'] , false, false ) guiGridListSetItemText ( charGrid, row, 3, tab[i]['skin'] , false, false ) end end addEvent("setCharacters",true) addEventHandler("setCharacters",root,setData) Try this one.
  2. function playMusic(button, state, _, _, _, _, _, clickedElement) if button == "left" and state == "down" and clickedElement == speaker then if isElement(sound) then stopSound(sound) else sound = playSound3D(url, -657.90002441406, 944.90002441406, 12) end end end addEventHandler("onClientClick", getRootElement(), playMusic)
  3. Try this one: function playMusic(button, state, _, _, _, _, _, clickedElement) if button == "left" and state == "down" and clickedElement == speaker then sound = playSound3D(url, -657.90002441406, 944.90002441406, 12) else stopSound(sound) end end addEventHandler("onClientClick", getRootElement(), playMusic)
  4. Can you get a text out to the chat with outputChatBox when you click on the element?
  5. Try debugging? Output a text when you click on the element?
  6. Did you try using a local file? Maybe the link is broken.
  7. setTimer(function() if isElement(object) then return end -- Trying to get the data, if is on the ground cancel the drop. local players = getPlayerCount() if tonumber(players) > 0 then -- 0 = 1 dropTHIS() else outputChatBox("players",root,255,255,255,true) return end end,20000,0) And just remove the setElementData line. (Nr. 18)
  8. Meanwhile I'm gone, could you express what should the script do at all?
  9. Added to TODO list, going to do it today for ya.
  10. NeXuS™

    ScreenShot

    Did you try dxCreateScreenSource?
  11. local posTable = { {{6556, 411, 60}, {6556, 411, 40}}, {{445, 31, 502}, {445, 31, 480}} } And then function dropTHIS() local rTable = posTable[math.random(#posTable)] spawnX, spawnY, spawnZ = unpack(rTable[1]) endX, endY, endZ = unpack(rTable[2]) object = createObject(objectID, spawnX, spawnY, spawnZ, rotX, rotY, rotZ) --< Creating the object >-- moveObject(object, Speed, endX, endY, endZ) setElementDoubleSided(object,true) setTimer(function() outputChatBox("The airdrop is on the ground in about 5 minutes!",root,255,255,255,true) end,3*100000,1) setTimer(function() arrowMarker = createMarker(1348.4276123047, 1333.0045166016,9.8,"cylinder",2, 255, 0, 0, 170 ) --< Creating the marker because attaching >-- end,9*100000,1) end addEventHandler("onResourceStart",root,dropTHIS)
  12. First of all, start reading the Wiki page. Without trying, you wont get anywhere. You'll have to make a resource to be able to load that code which @TheMOG sent you.
  13. Try posting it in the Hungarian section, maybe you can express yourself better there.
  14. You can just check the boxes position, and if it's at its end location, then destroy it.
  15. Create the marker on the end coordinates.
  16. I'm gonna give it a shot, wait a sec. Actually if you remove the attachElements line, it works fine.
  17. Make the markerSize bigger, I think the marker is inside the object, so the hit is not registered. Can you hit the marker now, or it's only possible if you jump up on top of the object?
  18. Can you copy that line for me please? Did you try changing the marker size?
  19. Did you rewrite this line? attachElements(arrowMarker,object, 0, 0, 2 ) -- < Attach... >--
  20. NeXuS™

    Help.

    I'm doing a whole script that allows you to put down any type of marker (tp, fix, nos, fadecam, etc.), by just a click in the editor res. (I'm not a newbie bud, you can check all those links I have linked in my sign., and also check out the forum for my comments. )
  21. Try putting the marker lower.
  22. Give us an example of you trying to make it yourself. We'll help ya, but won't make a script for you.
  23. NeXuS™

    Help.

    Publishing it today bud. Gonna be in WIP tho, so it can have bugs.
  24. Try this: local nrQuery = dbQuery(dbConnection, "SELECT * FROM accounts UNION SELECT * FROM licenses") local rQuery = dbPoll(nrQuery, -1) outputChatBox(toJSON(rQuery)) I dont know if UNION works here.
  25. function hitT(hitElement) if source == arrowMarker and getElementType(hitElement) == "player" then destroyElement(arrowMarker) destroyElement(object) outputChatBox("Hit") end end addEventHandler("onMarkerHit",root,hitT)
×
×
  • Create New...