Jump to content

Bean666

Members
  • Posts

    732
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Bean666

  1. Hello. whenever a player hits the marker, it shows for all players, anyway to fix this? it's clientside. function menuShow() visibleornot = guiGetVisible (window) if (visibleornot == true) then guiSetVisible (window, false) showCursor (false) end if (visibleornot == false) then guiSetVisible (window, true) showCursor (true) end end for k,v in ipairs( spots ) do marker = createMarker ( v[1],v[2],v[3], "Cylinder", 1.5, 255, 255, 255, 50 ) addEventHandler ("onClientMarkerHit", marker, menuShow) end
  2. ok calm your tits haha , if you want to set the camera on a place use setCameraTarget
  3. Bean666

    Team Issue

    can u give us what's written in debug.
  4. can you show us the part of? guiGridListGetSelectedItem
  5. don't use setCameraMatrix use setElementPosition setElementRotation and dont put the setElementInterior(ped, 18) on the markerhit , put it on the top with your createPed. wd be way easier.
  6. bad idea, if player got insufficient funds it would still work and would set his money to the cost of $, and if player got high money , it would set his money to the cost of $. use takePlayerMoney use this to get player's money getPlayerMoney
  7. try it yourself dimos. it won't work .already did try that, even with tables of commands. you are not allowed to remove / cancel MTA Native commands. even Castillo said that.
  8. No, you can't remove native MTA commands, the same way you can't detect them when you use the command(s). "i tried removing it, you can't."
  9. addEventHandler("onClientResourceStart", resourceRoot, function() setTimer(function() local localX, localY = getElementPosition(localPlayer) for _, blip in pairs(getElementsByType("blip")) do local blipX, blipY = getElementPosition(blip) if(getDistanceBetweenPoints2D(localX, localY, blipX, blipY) > 250) then setBlipVisibleDistance(blip, 500) destroyElement ( blip ) end end end, 500, 0) end) this one works in F11 and radar when you go far away from blip, but when you come back , blip isnt coming back anymore, which is easier to solve? the one i wrote above or htis?
  10. EDIT: oh now i get it, you're basically teleporting your marker into the interior ID # 3 i thought you wanted the marker to disappear when you hit on the marker. anyways here. try this: function craftenter( hitElement, matchingDimension ) setElementInterior(hitElement, 3) end addEventHandler( "onMarkerHit", myMarker, craftenter) if you want to put him to a certain position in the interior use this: setElementInterior ( hitElement, 3, x, y, z )
  11. hello. i used setBlipVisibleDistance for blips to be visible from a close range. it works only in the Mini-radar, but it doesn't work on F11. how to make it also happen in F11? i've been wondering about this since before. local blip = createBlip (-1025.5458984375, -977.3447265625, 129.21875, 44, 0, 0, 0, 0, 0, 0, 250) setBlipVisibleDistance(blip, 150)
  12. isObjectInACLGroup is better and way faster. so i recommend it. and please, this will be useful for you. https://wiki.multitheftauto.com/wiki/Sc ... troduction
  13. Bean666

    Hi There

    exampe addEventHandler("onClientGUIClick",button,function() if ( source == button) then guiSetVisible(GUI, false) end end )
  14. i think you can't , it's easy to set a map's dimension via lua. why not do that? setElementDimension
  15. you could put a cooldown everytime a player sends a msg
  16. Bean666

    Solved.

    function onSoundStopped() playSound( sound ) end addEventHandler ( "onClientSoundStopped", getRootElement(), onSoundStopped ) tried this , only got errors when sound ends. [expected string at argument 1 , got sound ] EDIT: OK thanks! never noticed that earlier
  17. Bean666

    Solved.

    never heard of that before. anyways ty, ill contact you when i got errors.
  18. Bean666

    Solved.

    How can i make this sound repeat endless? addEvent("soundin",true) addEventHandler("soundin", getRootElement(), function () sound = playSound("sound/music.mp3", false) if isElement(sound) then setSoundVolume(sound, 0.2) end end )
  19. sorry, didn;t know its serverside.
  20. remove that , before "h" and try this: bindKey( 'h', 'down', healer )
  21. try this : add this in client: addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then triggerServerEvent ("skin1",getLocalPlayer(),skin1) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[2],function() if ( source == GUIEditor.button[2]) then triggerServerEvent ("skin2",getLocalPlayer(),skin2) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[3],function() if ( source == GUIEditor.button[3]) then triggerServerEvent ("skin3",getLocalPlayer(),skin3) end end ) server: addEvent("skin1",true) addEventHandler("skin1",root, function() if ( getPlayerMoney (source) >= 0 ) then setElementModel ( source, 23 ) end end) addEvent("skin2",true) addEventHandler("skin2",root, function() if ( getPlayerMoney (source) >= 0 ) then setElementModel ( source, 24 ) end end) addEvent("skin3",true) addEventHandler("skin3",root, function() if ( getPlayerMoney (source) >= 0 ) then setElementModel ( source, 25 ) end end)
×
×
  • Create New...