Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  1. I think you could use some nicer things tho. Maybe create some objects, attach them together (so you can move them easily, with moveObject). You'll have to set up some positions early on, or you could just get a random player call a function near to him to get the ground's height. (If you want to do it this way, feel free to ask here, I'll help about it.) Back to the easy part. Creating an object and moving it on server side is easy. After that, you could use a marker, or a nicer way would be onElementClicked on client side. Again, feel free to choose, and respond here, so we can help about it.
  2. Nvm, it's one client sided, and one server sided script. Didnt check if it was or not. Try triggering without any args. Or maybe check debugscript?
  3. Do you load the server sided script first in your meta.xml?
  4. NeXuS™

    help

    addEventHandler("onClientPlayerWeaponFire", getRootElement(), function ( weapon, ammo, ammoInClip ) outputChatBox(weapon) local x,y,z = getElementPosition(source) if weapon == 1834 then local sound = playSound3D("sounds/AK74.wav", x,y,z) setSoundVolume(sound,10) setSoundMaxDistance(sound,75) end end)
  5. NeXuS™

    help

    Try debugging. Output the weapon into the chat. See if the event is called or not.
  6. You should read the dbPoll and dbFree desc.
  7. local sqlConnect = dbConnect("sqlite", "test.db") local querryH = dbQuerry(sqlConnect, "SELECT * FROM accounts") if querryH == statementHere then neededData = dbPoll(querryH, -1) else dbFree(querryH) end Thats all.
  8. dbQuery is for getting data, dbExec for inserting.
  9. NeXuS™

    Help mute

    You'll have to do a custom made mute system, and not the setPlayerMuted function.
  10. NeXuS™

    help

    local hitMarker = createMarker (1638.0502929688, -1152.9975585938, 22.5, "cylinder", 4, 255, 0, 0, 100) function enterFunction(hitPlayer, matchingDimension) if getElementType(hitPlayer) == "player" and not isPedInVehicle(hitPlayer) then setElementPosition(hitPlayer, 1637.2869873047, -1132.6866455078, 23.90625) outputChatBox("Welcome to Los Santos Boss Area!", hitPlayer) end end addEventHandler( "onMarkerHit", hitMarker, enterFunction)
  11. Refresh the page, I edited the post above.
  12. It's because its not a set value. You are multipling your values with x and y.
  13. Whats wrong with it? They are bigger.
  14. Then copy the addNotification's server side too.
  15. Are ya in the Admin ACL group? *EDIT* Just found out that a bracket was missing. addEventHandler("onPlayerChat", getRootElement(), function(msg) if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin"))) then cancelEvent() outputChatBox("[Admin] " .. getPlayerName(source) .. "#FFFFFF: " .. msg, getRootElement(), 255, 255, 255, true) end end) This one works totally fine.
  16. I dont know if you can do it with handlings, but maybe a trick would do with setElementVelocity.
  17. Try to replace line nr. 3 with: dxDrawText(v, x*599, y*(473)+(29*ii), x*599+x*350, y*(473)+(29*ii)+y*40, y, tocolor(0, 204, 0, 255), 1.00, dxfont1_AGENCYR, "center", "center", false, false, false, false, false)
  18. This does nothing. Just renaming a variable wouldn't do anything. Post your code about the addNotification function.
  19. Disable sprinting if he is not holding space. setControlState(localPlayer, "sprint", false) bindKey("space", "both", function() if getKeyState("space") then setPedControlState(localPlayer, "sprint", true) else setPedControlState(localPlayer, "sprint", false) end end) Should work, not tested tho.
  20. Client side, dont even try this on server side. setTimer(function() for i, k in ipairs(getElementsByType("vehicle", getRootElement(), true)) do if downloadFile(getElementModel(k) .. ".txd") then outputChatBox("Updated a file. (MODEL ID: " .. getElementModel(k) .. ")") end end for i, k in ipairs(getElementsByType("object", getRootElement(), true)) do if downloadFile(getElementModel(k) .. ".txd") then outputChatBox("Updated a file. (MODEL ID: " .. getElementModel(k) .. ")") end end end, 5000, 0) Should work, not tested tho.
  21. You could just if that model's id has a file for it in the server's download directory. I dunno abait the HTTP download, you gotta test that yourself, but I don't think so.
  22. You'll have to set up each model which has to be downloaded, and check for every object/car/item if he moved from his old position, or just by passed time.
  23. You could just add it to a renderTarget (via rendering, or just guiimage), and then apply that as the texture of the shader.
×
×
  • Create New...