Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  1. NeXuS™

    question

    Do you mean you change your IP via VPN? It could be that it takes too long to reach the server, that it'll drop your packets.
  2. I won't test until I don't see what's the problem.
  3. Ahh, because you don't know how to use debugscript. function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", localPlayer, cancelTearGasChoking)
  4. Only wanted players will choke with this script. I suppose policemans wont be criminals too.
  5. function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", cancelTearGasChoking)
  6. But how do you define the wanted player? Do you use element data on him? Do you use setPlayerWantedLevel?
  7. @maksam07, it's totally math. Look for codes on stackoverflow maybe.
  8. How do you define the wanted player? Do you use setPlayerWantedLevel for it?
  9. Use download priority. Search for it in this wiki page.
  10. function addBindServer (player, commandName, theKey, theNewCommandToAddBind) local arguments = {1, 2, 3, 4} local theEK = bindKey (player, theKey, "down", theNewCommandToAddBind, unpack(arguments)) if theEK == true then outputChatBox(tostring(theEK)) else outputChatBox(tostring(theEK)) end end addCommandHandler("addBind", addBindServer) Try it like this.
  11. And as I just linked, it's hardcoded into the MTA client, maybe next time, check the link mate.
  12. Vehicles = {[468]=true,[577]=true} function enterVehicle ( player, seat, jacked ) if (Vehicles[getElementModel(source)]) then cancelEvent() warpPedIntoVehicle(player, source) outputChatBox( "OK!", player) end end addEventHandler("onVehicleStartEnter", root, enterVehicle) Next time, check the wiki page.
  13. It wouldn't be such a good idea, use elementdata or accountdata, or at last, you can use a database.
  14. What do you want to do with the player data?
  15. NeXuS™

    UI in CEF

    Which files? The HTMLs?
  16. NeXuS™

    UI in CEF

    It's pretty stable to use it to create UI's. We have some cool stuffs done like this, and they don't really cause low fps/lags.
  17. You can't check the progress outside of the timer. Run your head through the code if you don't understand it totally. Progress_Window = {} function clientResourceStart( ) Progress_Window = guiCreateWindow(0.25, 0.9, 0.55, 0.05, "Testing Progress", true) guiWindowSetSizable(Progress_Window, false) guiSetProperty(Progress_Window, "CaptionColour", "FFFF0000") somebar = guiCreateProgressBar( 0.01, 0.4, 1, 1, true, Progress_Window ) if ( somebar ) then setProgress = setTimer(function() guiProgressBarSetProgress(somebar, progress+10) progress = guiProgressBarGetProgress(somebar) if (progress) >= (tonumber (100)) then guiSetProperty(Progress_Window, "CaptionColour", "FF00FF00") killTimer(setProgress) end end, 2000, 10) else outputChatBox ("Something went wrong!") end end addEventHandler( "onClientResourceStart", resourceRoot, clientResourceStart) --Sorted that Check this.
  18. StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") elseif hitPlayer == localPlayer then triggerServerEvent("poj", localPlayer) outputChatBox("Created vehicle!") end end addEventHandler("onClientMarkerHit", StartJobM, StartJob) Next time, look at your code, it was totally wrong in all matter.
  19. Progress_Window = {} function clientResourceStart( ) Progress_Window = guiCreateWindow(0.25, 0.9, 0.55, 0.05, "Testing Progress", true) guiWindowSetSizable(Progress_Window, false) guiSetProperty(Progress_Window, "CaptionColour", "FFFF0000") somebar = guiCreateProgressBar( 0.01, 0.4, 1, 1, true, Progress_Window ) if ( somebar ) then progress = guiProgressBarGetProgress(somebar) else setProgress = setTimer(function() guiProgressBarSetProgress(somebar, progress+10) if (progress) >= (tonumber (100)) then guiSetProperty(Progress_Window, "CaptionColour", "FF00FF00") killTimer(setProgress) end end, 2000, 10) else outputChatBox ("Something went wrong!") end end addEventHandler( "onClientResourceStart", resourceRoot, clientResourceSt Try this one.
  20. As it is not a resource, look for the code in the source code. I think it's this one.
  21. The one on top is the first element, the second is the first element's child etc.
  22. You can use getElementChildren for this function.
×
×
  • Create New...