Search the Community

Showing results for tags 'bind'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • community.mtasa.com
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Gang


Location


Occupation


Interests

Found 6 results

  1. Estava fazendo um sistema que em uma parte dele seria preciso utilizar uma bind dentro de um marker para criar um veiculo. Fiz tudo certo, porém, fiz no client-side e acabei sabendo que veículos criados no client-side serviriam apenas para "enfeite", tentei então aprender a como fazer bind no server-side, li na wiki do mta e vi videos relacionados a ela, mas não consegui fazer da maneira correta. Ainda estou confuso com a função bindKey, então se tiver alguém que possa me explicar um pouco dela ou pelo menos me ajudar dizendo o que esta de errado no código, ficarei grato. local g1 = createMarker (1517.796, -694.59, 92.00, "cylinder", 3.0, 184,0,0, 150) function buffalo () bindKey (source, "e", "down", function(thePlayer, player) if isElementWithinMarker(thePlayer, g1) then createVehicle(551, 1517.6644287109,-689.70690917969,94.75) end end) end addEventHandler ("onPlayerLogin", getRootElement(), buffalo)
  2. PlaKS

    Problema com bind

    Estou fazendo um sistema que ao passar pelo marker e apertar "e", spawnaria um veiculo, porem esta spawnando 2 veiculos (quando aperta e quando solta a tecla), mas queria que spawnasse apenas quando apertasse. O código esta assim: local g1 = createMarker (1517.796, -694.59, 92.00, "cylinder", 3.0, 184,0,0, 150) addEventHandler ("onClientMarkerHit", g1, function() addEventHandler ("onClientKey", root, function (button, press) if isElementWithinMarker (localPlayer, g1) then if button == "e" then createVehicle ( 402, 1517.172, -690.4, 94.75, 0, 0, 100) end end end ) end )
  3. Client.lua: function processLockUnlock(vehicle) if vehicle then local vehicleID = tonumber(getElementData(vehicle, "veh:id")) or -1 local vehFaction = tonumber(getElementData(vehicle, "veh:faction")) or 0 local vehOwner = tonumber(getElementData(vehicle, "veh:owner")) or -1 local vehJobID = tonumber(getElementData(vehicle, "veh:jobvehID")) or -1 local locked = isVehicleLocked(vehicle) local vehID = getElementModel(vehicle) local vehName = getVehicleRealName(vehID) if isPedInVehicle(localPlayer) then playSounds("lockin") else playSounds("lockout") end if locked then triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, false) else triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, true) end else outputChatBox("#FFFFFF Nincs kulcsod ehhez a járműhöz.", 169,139,101, true) end end local klikkTimer = false function setVehicleLockState() if klikkTimer then return end if isTimer(klikkTimerRun) then return end klikkTimer = true klikkTimerRun = setTimer(function() klikkTimer = false end,1000,1) local vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle then processLockUnlock(vehicle) else local int2 = getElementInterior(localPlayer) local dim2 = getElementDimension(localPlayer) local mx,my,mz = getElementPosition(localPlayer) local interior = getElementData(localPlayer, "interior") or false if not interior then for k,v in ipairs(getElementsByType("vehicle")) do local x,y,z = getElementPosition(v) local int = getElementInterior(v) local dim = getElementDimension(v) local dist = getDistanceBetweenPoints3D(x,y,z,mx,my,mz) if dist <= 3 and int2 == int and dim2 == dim then processLockUnlock(v) return end end end end end bindKey("k", "down", setVehicleLockState) setTimer(function() if not bindKey("k", "down", setVehicleLockState) then bindKey("k", "down", setVehicleLockState) end end, 1000, 0) Server.lua: addEvent("vehicleLock",true) addEventHandler("vehicleLock",getRootElement(),function(player,veh,value) setVehicleLocked(veh, value) veh:setData("veh:status", value) end) No errors / warnings in debugscript... if i press the [K] button, nothing happens... what wrong in this code? how to fix?
  4. Preciso de ajuda para transferir um texto copiado para um lugar em específico No servidor drift paradise, há um sistema que pode escrever no carro com fontes, porém eu quero colar um texto que copiei (não grande, só de umas 2 palavras) só que não consigo de jeito nenhum, alguém sabe se tem algum comando que faça isso sem o CTRL V?
  5. italoblade1

    HELP BIND

    I need a help from the community, it is possible to prevent a player from using a specific bind, such as crouching on the mouse1, if possible, how to do it. Many players take advantage of bugs because of this, I wanted the player to be kicked when entering with bind or to take kick when to configure this bind
  6. Hello guys, I tried to bind escape to my function in 2 ways. (the function is working tried with other buttons) The first was bindKey but when I use it its not binding escape but all other buttons. When I use the event onClientKey escape is working but not correctly. When I press it the first time its working but when I press it the second time its not working. (so its not working when the player is in the menu) (btw its a AFK system I made) this way is not working: bindKey ( "escape", "down", function ) this was isnt working correctly (this is what I found on wiki: Note: the escape key can only be cancelled once. If a user presses the escape key twice in a row the main menu will still open. ): function pressDown (button, press) if button == "escape" then if press then -- when the button is pressed down (true) function() end end end addEventHandler ("onClientKey", root, pressDown) Guys I hope you can help me with that