Jump to content

Bean666

Members
  • Posts

    732
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Bean666

  1. bump. sorry for double post
  2. anyways i got one more prob, i want this loot system to have multiple weapons, i tried to make another table and GUis of different weapons, but it doesnt work, it just shows me the M4 GUI. if i make another table of markers ,it shows me just the M4 GUI. this is my very last problem now. each marker i make , it' shows the Same GUI, i think it's because of the resourceroot , i think it's easier in serverside?
  3. anyways does hitElement work with client, no right? nvm it doesn't.
  4. okay thanks i got it working now, Solved. ill keep resourceRoot in mind. all i need is the marker colshape / hitElement now since i can access it from higher locations. solved.
  5. i used this and it works for the normal marker, how to make it work on the table? EDIT: I noticed a problem in this Code. it only recovers in the first time i destroy it , the second time i destroy it it doesnt recover anymore, this needs a table maybe? local bankmarker = createMarker( 2493.93823, -1665.07031, 13.34375, "cylinder", 1.5, 255, 0, 0, 255 ) addEventHandler("onClientElementDestroy", getRootElement(), function () if getElementType(source) == "marker" and source == bankmarker then setTimer ( function() local bankmarker = createMarker( 2493.93823, -1665.07031, 13.34375, "cylinder", 1.5, 255, 0, 0, 255 ) end,3000,1) end end )
  6. what functions do i need to use to respawn the certain marker you destroyed? any help appreciated.
  7. it worked , thank you. but is there anyway to respawn the certain marker you destroyed after like 50000 millisecond? what functions do i need to use? any help appreciated.
  8. codyL's code have few errors so i edited his script and tested and it works local objects = getElementsByType("object") for i, v in ipairs(objects) do local x,y,z = getElementPosition(v) local xr,yr,zr = getElementRotation(v) setLowLODElement(v,createObject ( getElementModel(v), x,y,z,xr,yr,zr,true ) ) end
  9. no errors, i can destroy 1st marker, but when i go to 2nd marker, still doesn't destroy it.
  10. i think the problem is in client have you tried to change the current triggerServerEvents to the ones i sent? anyways please use /debugscript 3 and tell us your errors.
  11. try changing triggerClientEvent(source,"zalogowanyGracz",getRootElement()) all getRootElement() with source example: triggerClientEvent( source, "zalogowanyGracz", source ) anyways if it's still not working i don't know if its the triggers that cause the prob.
  12. in serverside.. do not put "client" . put "source or whatever the element is" example: triggerClientEvent(source, "eventname", source) and in serverside try this: triggerServerEvent("zalogujGracza",getLocalPlayer(),guiGetText(LogRegEdit[1]),getPlayerSerial(getLocalPlayer()),zalogujGracza) triggerServerEvent("weryfikacja",getLocalPlayer(),getPlayerSerial(getLocalPlayer()),weryfikacja)
  13. Bean666

    help

    as he said use killTimer or if you mean: cancelEvent well i dont know if you mean cancelEvent but imo, it's killTimer that can cancel that function you are making.
  14. yes i have markers visible at the same time because it's a loot system anyways , when i click the "M4" Button in the second marker, it destroys the first marker from the table, no errors, but when i do it first to the 1st marker from table, i press M4 Button, it destroys the current marker "first marker", no errors, but when the first marker is destroyed, i go to second marker, pressed M4 Button, doesnt destroy the second marker and this is the error: Client line 13 Bad Argument @ 'destroyElement' [Expected element at argument 1]
  15. the Problem is ,it will still trigger even tho the player has all the files done because the function is onPlayerJoin it triggers everytime when a player joins your server even tho they have the download done.
  16. aight thanks it worked, will this work on playerblips too>?
  17. 20: attempt to compare number with nil it's now Cside.
  18. Aight... thanks for the info. i hope it'll be fixed soon if it's a bug, but i think it's not.
  19. no warning. nothing shows up in debug.
  20. hello. when i hit the marker with colshape, the GUI doesn't show up. server theMarker = createMarker( 2492.1240234375, -1670.7578125, 12.3, "cylinder", 1.5, 0, 255, 0, 80 ) local theShape = getElementColShape( theMarker ) function oncolhit (player, hitElement) if getElementType ( player ) == "player" then triggerClientEvent(player, "showGUI", player) end end addEventHandler ("onColShapeHit", theShape, oncolhit) client: addEvent("showGUI", true) function guishow(player) guiSetVisible(classWnd, true) showCursor(true) end addEventHandler("showGUI",getRootElement(),guishow)
  21. errors i get. local hiddenblips = { {2473.7490234375, -1665.7666015625, 13.313109397888}, {2490.865234375, -1667.84765625, 13.34375} } setTimer(function() local localX, localY = getElementPosition(localPlayer) for _, blip in pairs(getElementsByType("blip")) do local blipX, blipY = getElementPosition(blip) local maxdistance = getBlipVisibleDistance(blip) local r, g, b, a = getBlipColor(blip) if(getDistanceBetweenPoints2D(localX, localY, blipX, blipY) > maxdistance) then table.insert(hiddenblips, { blipX, blipY, getBlipIcon(blip), getBlipSize(blip), getBlipOrdering(blip), maxdistance, r, g, b, a }) destroyElement(blip) end end for key, blip in pairs(hiddenblips) do if(getDistanceBetweenPoints2D(localX, localY, blip[1], blip[2]) < blip[6]) then createBlip( blip[1], blip[2], 0, blip[3], blip[4], blip[7], blip[8], blip[9], blip[10], blip[5], blip[6], 56 ) hiddenblips[key] = nil end end end, 500, 0)
  22. that's possible to work on a playerblip right?
  23. for k,v in ipairs( spots ) do marker = createMarker ( v[1],v[2],v[3], "Cylinder", 1, 255, 255, 255, 100 ) function MarkerHit ( hitPlayer, matchingDimension ) if (hitPlayer == localPlayer) then guiSetVisible(window, true) showCursor(true) end end addEventHandler ( "onClientMarkerHit", marker, MarkerHit ) end this seems simplier, it works but will it show for other players too? i think not.
×
×
  • Create New...