Search the Community

Showing results for tags 'bindkey'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 17 results

  1. What's wrong? scirpt: plalyer-> seat to vehicle-> pres space and draw handbrake image debugscript errors :((( code: function hand ( thePlayer ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then dxDrawImage(200,110,100,100,"hand.png", 255,255,255,true, theVehicle, thePlayer) end end bindKey("space","down", hand)
  2. redditing


    Is there a function similar to ToogleControl but with Binds? I mean, there is such a function attached to BindKey (under the "k" key), and I would like to press the "k" function just like in ToggleControl, where we clicked eg left mouse button to shoot
  3. Eu só queria saber como eu faço pra trocar essa função de comando, para uma de tecla. Ao invés de ter que digitar o comando, eu queria que apenas pressionasse "F"
  4. I am a beginner regarding the Lua language, the problem is very simple actually when I enter the server the panel to change the weather overrides the login panel I wanted to make it be activated only by bind ie when starting the server it would be set to off and pressing bind appears .. GUIEditor = { button = {}, label = {} } addEventHandler('onClientResourceStart', resourceRoot, function() wnd = guiCreateWindow(812, 300, 301, 423, "Painel Clima", false, wnd) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 0.97) guiSetProperty(wnd, "CaptionColour", "FF0988F3") showCursor(true) close = guiCreateButton(9, 22, 24, 23, "X", true, wnd) guiSetAlpha(close, 0.80) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "FFFB0000") cloud = guiCreateButton(10, 86, 130, 36, "Névoa", false, wnd) guiSetAlpha(cloud, 0.80) guiSetFont(cloud, "default-bold-small") guiSetProperty(cloud, "NormalTextColour", "FF243DDA") rain = guiCreateButton(9, 132, 130, 36, "Chuva", false, wnd) guiSetAlpha(rain, 0.80) guiSetFont(rain, "default-bold-small") guiSetProperty(rain, "NormalTextColour", "FFEC116E") sun = guiCreateButton(9, 178, 130, 37, "Ensolarado", true, wnd) guiSetAlpha(sun, 0.80) guiSetFont(sun, "default-bold-small") guiSetProperty(sun, "NormalTextColour", "FFF4FD00") GUIEditor.label[1] = guiCreateLabel(34, 24, 152, 21, "Fechar", true, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 43, 109, 207) bluesky = guiCreateButton(9, 225, 132, 36, "Céu azul", false, wnd) guiSetFont(bluesky, "default-bold-small") guiSetProperty(bluesky, "NormalTextColour", "FF09C0F5") sand = guiCreateButton(9, 271, 130, 37, "Tempestade de areia", false, wnd) guiSetFont(sand, "default-bold-small") guiSetProperty(sand, "NormalTextColour", "FFBD8A40") Dull = guiCreateButton(9, 318, 130, 37, "Nublado", false, wnd) guiSetFont(Dull, "default-bold-small") guiSetProperty(Dull, "NormalTextColour", "FF43D12B") hot = guiCreateButton(9, 365, 130, 37, "Ensolarado", false, wnd) guiSetFont(hot, "default-bold-small") guiSetProperty(hot, "NormalTextColour", "FFF35B08") morning = guiCreateButton(160, 86, 130, 36, "09:00", false, wnd) guiSetAlpha(morning, 0.80) guiSetFont(morning, "default-bold-small") guiSetProperty(morning, "NormalTextColour", "FF17DBF3") GUIEditor.label[2] = guiCreateLabel(11, 60, 129, 16, "Clima:", false, wnd) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 189, 176, 247) GUIEditor.label[3] = guiCreateLabel(160, 60, 122, 17, "Tempo:", false, wnd) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 189, 176, 247) afternoon = guiCreateButton(160, 132, 130, 36, "12:00", false, wnd) guiSetAlpha(afternoon, 0.80) guiSetFont(afternoon, "default-bold-small") guiSetProperty(afternoon, "NormalTextColour", "FF17DBF3") day = guiCreateButton(160, 179, 130, 36, "15:00", false, wnd) guiSetAlpha(day, 0.80) guiSetFont(day, "default-bold-small") guiSetProperty(day, "NormalTextColour", "FF17DBF3") beforenight = guiCreateButton(160, 225, 130, 36, "18:00", false, wnd) guiSetAlpha(beforenight, 0.80) guiSetFont(beforenight, "default-bold-small") guiSetProperty(beforenight, "NormalTextColour", "FF17DBF3") night = guiCreateButton(160, 272, 130, 36, "22:00", false, wnd) guiSetAlpha(night, 0.80) guiSetFont(night, "default-bold-small") guiSetProperty(night, "NormalTextColour", "FF17DBF3") innight = guiCreateButton(160, 365, 130, 36, "02:00", false, wnd) guiSetAlpha(innight, 0.80) guiSetFont(innight, "default-bold-small") guiSetProperty(innight, "NormalTextColour", "FF17DBF3") minuit = guiCreateButton(160, 319, 130, 36, "00:00", false, wnd) guiSetAlpha(minuit, 0.80) guiSetFont(minuit, "default-bold-small") guiSetProperty(minuit, "NormalTextColour", "FF17DBF3") GUIEditor.label[4] = guiCreateLabel(9, 403, 130, 15, "edited by Sweather", false, wnd) guiSetAlpha(GUIEditor.label[4], 0.45) guiSetFont(GUIEditor.label[4], "default-small") guiLabelSetColor(GUIEditor.label[4], 154, 146, 146) end ) --------------------------------------------------------------- ----------------------[Closing The window]--------------------- addEventHandler("onClientGUIClick", root, -- Event function() -- Function if ( source == close ) then -- Chick guiSetVisible ( wnd , false)-- Show Window ( false = Visible! ) showCursor(false) end -- Close( if ) end -- Close Function ) -- Close Event ------------------------------------------------------------ -----------------------[Weathers]--------------------------- function onGuiClick (button, state, absoluteX, absoluteY) if (source == rain) then setWeather ( 16 ) elseif (source == sun) then setWeather ( 11 ) elseif (source == cloud) then setWeather ( 9 ) elseif (source == bluesky) then setWeather (10) elseif (source == sand) then setWeather (19) elseif (source == hot) then setWeather (18) elseif (source == Dull) then setWeather (12) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) -------------------------------------------------------------------- ----------------------------[Time]---------------------------------- function onGuiClick (button, state, absoluteX, absoluteY) if (source == morning) then setTime( 09, 0 ) elseif (source == afternoon) then setTime( 12, 0 ) elseif (source == day) then setTime( 15, 0 ) elseif (source == beforenight) then setTime (18, 0) elseif (source == night) then setTime (22, 0) elseif (source == innight) then setTime (02, 0) elseif (source == minuit) then setTime (00,0) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) -------------------------------------------------------------------- ----------------------[open the window]----------------------------- function open() guiSetVisible(wnd,not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey("F6","down",open)
  5. Tenho 2 scripts, um de animação por binds e outro de assaltos, queria saber como faço para não cancelar a animação do roubo e fazer o jogador continuar fazendo o roubo, para ele não sair do freeze do roubo e pegar o dinheiro fora do local já, tentei com flags e getElementData e nada. Animação function animcruzabraco () if getElementData ( localPlayer, "cruzabracodt" ) == false then setElementData(localPlayer, "cruzabracodt", true) setElementFrozen ( localPlayer, true ) triggerServerEvent("animcruzabraco",localPlayer) else setElementFrozen ( localPlayer, false ) setElementData(localPlayer, "cruzabracodt", false) triggerServerEvent("paraanim",localPlayer) end end bindKey("b", "both", animcruzabraco) Roubo function sistema1(source) if source then if isElementWithinMarker(source, loja1) then local weaponType = getPedWeapon ( source ) if weaponType == 0 then outputChatBox ( "#727272Você está desarmado. #464646Tenha uma arma para assaltar.", source, 255, 255, 255, true ) else outputChatBox(" ", source, 255, 255, 255, true) outputChatBox("#cf3f3fINDFO: #e2e2e2Você está começando a roubar o banco Caixa #727272(Aguarde 4 minutos ou será punido). #e41c1cAs autoridades estão vindo.", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) setElementVisibleTo( loja1ass, root, true) setElementFrozen( source, true ) setPedAnimation( source, "bomber", "bom_plant_loop", 240000, true, false, false, false ) setMarkerSize(loja1, 0) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox("#cf3f3fINFO: #e41c1cAtenção todas as autoridades. #e2e2e2O banco Caixa está sendo assaltado, compareçam ao local urgentemente!", root, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) setTimer(function(source) givePlayerMoney(source, GranaBanco) setElementFrozen( source, false ) setPlayerWantedLevel( source, 6 ) outputChatBox("#cf3f3fINFO: #e41c1cVocê assaltou o banco Caixa e ganhou R$ "..GranaBanco, source, 255, 255, 255, true) end,240000,1,source) setTimer(function(source) setMarkerSize(loja1, 2.5) setElementVisibleTo( loja1ass, root, false) end,1800000,1,source) end end end end addCommandHandler("roubar", sistema1)
  6. PL: Nie mogę używać wiążącego klucza na literę k aby silnik sie wyłączał. PL: Nie moge ustawić klawisza powiązania , ABY mozna bylo wykonać dziesięć Skrypt Za Pomocą funkcji „K” turnEngine (odtwarzacz) Lokalny Samochód = getPedOccupiedVehicle (odtwarzacz) if (Samochód i getVehicleController (Samochód) == gracz), A następnie ustawVehicleEngineState (Samochód, (not getVehicleEngineState (car))) if (getVehicleEngineState (car)) następnie outputChatBox („Silnik: Twój silnik wyposażony wyposażony.”, player, 0, 255, 0) else outputChatBox („Silnik: Twój silnik dostępny wyłączony.” , 255, 0, 0) koniec koniec koniec addCommandHandler („k”,
  7. 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)
  8. 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 )
  9. 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?
  10. como eu ativo meu teamsay para as team? por que quando eu entro na team e digito cai no chat say não no teamsay.
  11. Gente como eu privaria isso para 1 grupo só? addCommandHandler("fogo", function(lp) local x,y,z=getElementPosition(lp) local Rocket=createObject(3790,x,y,z-1.5,0,90,0) setTimer(function() moveObject(Rocket,500, x+math.random(0,5), y+math.random(0,5), z+math.random(20,50), 0, 0, math.random(0,200)) triggerClientEvent(root, "startSilvesterRocket", root, x, y, z) setTimer(function() local xr,yr,zr=getElementPosition(Rocket) createExplosion(xr,yr,zr,9,lp) createExplosion(xr,yr,zr,4,lp) destroyElement(Rocket) end,500,1) end,2000,1) end) MaxRocketPack = 3 RocketPack = 0
  12. function rights () outputChatBox("", getRootElement(), 0, 255, 0, false) end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),rights) function permission (source) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Staff")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then triggerClientEvent(source, "openAdmin", getRootElement()) end end addCommandHandler("mod", permission) function info (player) info = {} local user = getPlayerFromName(player) if not isGuestAccount(getPlayerAccount(user)) then local username = getAccountName(getPlayerAccount(user)) local team = getTeamName(getPlayerTeam(user)) local wanted = getPlayerWantedLevel(user) local ip = getPlayerIP(user) local serial = getPlayerSerial(user) local money = getPlayerMoney(user) local veh = getVehicleName(getPedOccupiedVehicle(user)) triggerClientEvent(source, "sendInformationClient",root,username,team,wanted,ip,serial,money,veh) end end addEvent("sendInfoServer", true) addEventHandler("sendInfoServer", getRootElement(), info) function mute (client) player = getPlayerFromName(client) if isPlayerMuted(player) == false then setPlayerMuted(player, true) outputChatBox(getPlayerName(player).." has been muted by "..getPlayerName(source), getRootElement(), 255, 0, 0, false) elseif isPlayerMuted(player) == true then setPlayerMuted(player, false) outputChatBox(getPlayerName(player).." has been unmuted by "..getPlayerName(source), getRootElement(), 0, 255, 0, false) end end addEvent("mutePlayer", true) addEventHandler("mutePlayer", getRootElement(), mute) function freeze (client) player = getPlayerFromName(client) if isPedFrozen(player) == false then setElementFrozen(player, true) outputChatBox(getPlayerName(player).." has been frozen by "..getPlayerName(source), getRootElement(), 255, 0, 0, false) elseif isPedFrozen(player) == true then setElementFrozen(player, false) outputChatBox(getPlayerName(player).." has been unfrozen by "..getPlayerName(source), getRootElement(), 0, 255, 0, false) end end addEvent("freezePlayer", true) addEventHandler("freezePlayer", getRootElement(), freeze) function warpto (thePlayer) local player = getPlayerFromName(thePlayer) local x,y,z = getElementPosition(player) if isPedInVehicle(source) == true then removePedFromVehicle(source,getPedOccupiedVehicle(source)) setElementPosition(source, x, y+1, z+1) outputChatBox("You have warped to "..getPlayerName(player), source, 0, 255, 0, false) elseif isPedInVehicle(source) == false then setElementPosition(source, x, y+1, z+1) outputChatBox("You have warped to "..getPlayerName(player), source, 0, 255, 0, false) end end addEvent("warptoPlayer", true) addEventHandler("warptoPlayer", getRootElement(), warpto) function warphere (thePlayer) local player = getPlayerFromName(thePlayer) local x,y,z = getElementPosition(source) if isPedInVehicle(player) == true then removePedFromVehicle(player,getPedOccupiedVehicle(player)) setElementPosition(player, x, y+1, z+1) outputChatBox("You have been warped to "..getPlayerName(source), player, 0, 255, 0, false) elseif isPedInVehicle(player) == false then setElementPosition(player, x, y+1, z+1) outputChatBox("You have been warped to "..getPlayerName(source), player, 0, 255, 0, false) end end addEvent("warpPlayerhere", true) addEventHandler("warpPlayerhere", getRootElement(), warphere) function killgay (gay) setElementHealth(getPlayerFromName(gay),0) end addEvent("kill:O", true) addEventHandler("kill:O", getRootElement(), killgay) function wantedlvl (client, amount) player = getPlayerFromName(client) setPlayerWantedLevel(player, amount) outputChatBox(getPlayerName(player).."'s wanted level has been changed to "..amount.." by "..getPlayerName(source), getRootElement(), 255, 0, 0, false) end addEvent("setPlayerwanted", true) addEventHandler("setPlayerwanted", getRootElement(), wantedlvl) function kickgay (client, respon, reason) player = getPlayerFromName(client) kickPlayer(player, respon, reason) outputChatBox(getPlayerName(player).." has been kicked by "..getPlayerName(respon), getRootElement()) end addEvent("kickPlayeraway", true) addEventHandler("kickPlayeraway", getRootElement(), kickgay) function setskin (client, ID) player = getPlayerFromName(client) setElementModel(player, ID) outputChatBox("Your skin has been changed to "..ID.." by "..getPlayerName(source), player, 255, 255, 0, false) end addEvent("setPlayerskin", true) addEventHandler("setPlayerskin", getRootElement(), setskin) function setHP (client, amount) player = getPlayerFromName(client) setElementHealth(player, amount) outputChatBox("Your health has been changed to "..amount.." by "..getPlayerName(source), player, 0, 255, 255, false) end addEvent("setPlayerhealth", true) addEventHandler("setPlayerhealth", getRootElement(), setHP) function setArmor (client, amount) player = getPlayerFromName(client) setPedArmor(player, amount) outputChatBox("Your armor has been changed to "..amount.." by "..getPlayerName(source), player, 0, 255, 255, false) end addEvent("setPlayerarmor", true) addEventHandler("setPlayerarmor", getRootElement(), setArmor) function announce (text) outputChatBox("*ADMIN* "..text, getRootElement(), 255, 0, 0, false) end addEvent("adminAnnounce", true) addEventHandler("adminAnnounce", getRootElement(), announce) function destroycar (client) player = getPlayerFromName(client) car = getPedOccupiedVehicle(player) if isPedInVehicle(player) then destroyElement(car) outputChatBox("Your car has been destroyed by "..getPlayerName(source), player, 255, 0, 0, false) outputChatBox("You have destroyed "..getPlayerName(player).."'s car", source, 255, 0, 0, false) else outputChatBox(getPlayerName(player).." isn't in a vehicle", source, 255, 0, 0, false) end end addEvent("destroyveh", true) addEventHandler("destroyveh", getRootElement(), destroycar) function fixcar (client) player = getPlayerFromName(client) car = getPedOccupiedVehicle(player) if isPedInVehicle(player) then fixVehicle(car) outputChatBox("Your car has been fixed by "..getPlayerName(source), player, 255, 0, 0, false) outputChatBox("You have fixed "..getPlayerName(player).."'s car", source, 255, 0, 0, false) else outputChatBox(getPlayerName(player).." isn't in a vehicle", source, 255, 0, 0, false) end end addEvent("fixveh", true) addEventHandler("fixveh", getRootElement(), fixcar) hello good before all this script is mine only to edit it to make it panel moderator l have a problem that only to open the panel is addCommandHandler and I have done many BindKey functions and then I would like someone to help me make the bindKey and be able to Positioning to the "Server.Lua" what I just put there is all the Server.Lua and want to position the bindkey somewhere but that is on the Server.Lua Help Please I do.
  13. I have been trying to bindkeys to a command clientside and save them inside a xml file. But the mta binding cache is stacking up. Keys: 'x', 'u', 'x' See screenshot bellow. The problem shows up when you edit the bindkey in the settings menu and load the xml file after saving it. To use the bindkeys, you have to bind it with any key on your keyboard. To know which bindkeys are bound to a command with your previous visit, you have to bind any key of your keyboard to that command in order to use: getBoundKeys / getKeyBoundToCommand If you use unbindKey, it will unbind the command for all other keys, but not remove it from the cache. And another problem, I can't remove keys/'alternative keys' from the cache unless I click on the 'Load defaults button on the right bottom'. This is the code I have been testing with:
  14. Greetings, i am making a new script to chatBox, but i have some problem making a script to binds with my new chatBox. The user when want make the bind (example: /bind 4 drawLineInScreen colorR colorG colorB) i take the string drawLineInScreen, but when i want make te bind using bindKey, there are 2 options. option 1 bool bindKey ( player thePlayer, string key, string keyState, function handlerFunction, [ var arguments, ... ] ) option 2 bool bindKey ( player thePlayer, string key, string keyState, string commandName, [ string arguments ] ) In option 1 i can add 1 or more arguments, in option 2 i can add 1 only argument. The data than i have is the commandName, I need the function to my commandName and i can use very arguments with the option 1. PLS HELP ME.
  15. Mojko

    bindKey (server)

    Hey I need some help, regarding "bindKey" so what I basicly want to do is check if the player is pressing down a button, and when he does, I want to return a boolean value. function keyInput(player, key, keyState) if(keyState == "down") then end outputChatBox("Pressing: " .. key) end function bindKeysWhenPlayerJoin() bindKey(source, "lalt", "down", keyInput) end addEventHandler("onPlayerJoin", getRootElement(), bindKeysWhenPlayerJoin) So basicly I have the basics down, when the player joins the server the keys will bind, and when I press "lalt" then it gets printed out to the player's chat box. The issue here is though, that I can't use this, for like anything, since I cannot return a value that I can later use. Let me give an example. Psuedo code: I want to check if - The player is colliding with a static pickup - The player is pressing lalt then print a message Code: function playerPickupCollision(pickup, dimension) -- Jobs for i = 1, #pickupInformation do if(pickup == pickupInformation[i][PICKUP_ID]) then outputChatBox(i, source) if(pickupInformation[i][TYPE] == "Job" && pressing_key("lalt")) then outputChatBox("Press LALT to become a " .. pickupInformation[i][DESCRIPTION], source) end if(pickupInformation[i][TYPE] == "Property" && pressing_key("lalt")) then outputChatBox("This is the " .. pickupInformation[i][DESCRIPTION], source) end end end end addEventHandler("onPlayerPickupHit", getRootElement(), playerPickupCollision) (pressing_key isn't an actual function. it's the kind of function I want to create) Thank you!
  16. análisis de la función () Ventana = guiCreateWindow (207, 164, 442, 357, "Panel De Mods Beta | Servidor", false) guiWindowSetSizable (Ventana, falsa) guiSetVisible (Ventana, falsa) ShowCursor (falso) armaon = guiCreateButton (9, 69, 39, 19, "On", falsa, ventana) guiSetProperty (armaon, "NormalTextColour", "FFAAAAAA") armaoff = guiCreateButton (58, 69, 39, 19, "Off", falsa, Ventana) guiSetProperty (armaoff, "NormalTextColour", "FFAAAAAA") labe = guiCreateLabel (31, 44, 43, 15, "Armas:", falsa, ventana) guiSetFont (Labe, "default-negrita-pequeño") AUTOON = guiCreateButton (127, 69, 39, 19, "On", falsa, ventana) guiSetProperty (AUTOON, "NormalTextColour", "FFAAAAAA") autoof = guiCreateButton (176, 69, 39, 19, "Off", falsa, ventana) guiSetProperty (autoof, "NormalTextColour", "FFAAAAAA") de la nariz = guiCreateLabel (141, 44, 64, 15, "Vehiculos:", falsa, ventana) guiSetFont (nariz, "default-negrita-pequeño") Mucho = guiCreateLabel (274, 44, 34, 15, "Skins:", falsa, ventana) guiSetFont (mucho, "default-negrita-pequeño") skinon = guiCreateButton (245, 69, 39, 19, "On", falsa, ventana) guiSetProperty (skinon "NormalTextColour", "FFAAAAAA") skinoff = guiCreateButton (294, 69, 39, 19, "Off", falsa, ventana) guiSetProperty (skinoff, "NormalTextColour", "FFAAAAAA") Hudon = guiCreateButton (344, 69, 39 19, "On", falsa, ventana) guiSetProperty (Hudon, "NormalTextColour", "FFAAAAAA") hudoff = guiCreateButton (393, 69, 38, 19, "Off", falsa, ventana) guiSetProperty (hudoff, "NormalTextColour" "FFAAAAAA") HUD = guiCreateLabel (373, 44, 23, 15, "Hud", falsa, ventana) busque = guiCreateLabel (8, 126, 266, 15, "* Bienvenidos al Servidor .", falsa, ventana) guiSetFont (Bien, "default-negrita-pequeño") guiLabelSetColor (BIEN, 37, 142, 249) masss = guiCreateLabel (8, 201, 423, 15, "* Estós hijo Los Siguientes Mods Que PUEDES Desactivar para Ganar mas fps.", falso, ventana) guiSetFont (masss, "default-negrita-pequeño") guiLabelSetColor (masss, 37, 142, 249) Raios = guiCreateLabel (8, 176, 346, 15, "* Para Desactivar ALGÚN mod Debes apretar haga clic en Off / On "., falsa, ventana) guiSetFont (Raios," por defecto-bold-pequeño ") guiLabelSetColor (Raios, 37, 142, 249) raioss = guiCreateLabel (8, 151, 423, 15," * Selecciona Los mods Que quieras Desactivar Y viceversa, ganas mas fps ", falsa, ventana). guiSetFont (raioss," default-negrita-pequeño ") guiLabelSetColor (raioss, 37, 142, 249) REE = guiCreateLabel (8, 226, 423, 15," - Vehiculos (Pronto Mejora un uno Desactivar uno por) ", falsa, ventana) guiSetFont (ree," default-negrita-pequeño ") guiLabelSetColor (REE, 37, 142, 249) reeb = guiCreateLabel (8, 251, 302, 15," - Pieles (. Pronto Mejora Para Desactivar Uno por Uno) ", falsa, ventana) guiSetFont (Reeb," default-negrita-pequeño ") guiLabelSetColor (Reeb, 37, 142, 249) ifo = guiCreateLabel (8, 276, 37, 15, "-. Hud", falsa, ventana) guiSetFont (ifo, "default-negrita pequeña") guiLabelSetColor (ifo, 37, 142, 249) iforr = guiCreateLabel (8, 301, 54, 15, "- Armas. ", falsa, ventana) guiSetFont (iforr," ") default-negrita-pequeña guiLabelSetColor (iforr, 37, 142, 249) ncluso = guiCreateLabel (8, 326, 423, 15," * es Una versión beta 1.0, insecto CUALQUIER Contactarse con Algún personal. ", falsa, ventana) guiSetFont (ven," default-negrita-pequeño ") guiLabelSetColor (ven, 37, 142, 249) final AddEventHandler (" onClientResourceStart ", getRootElement (), el panel) la función de abrir () si guiGetVisible (ventana) == true entonces guiSetVisible (Ventana, falsa) ShowCursor (falso) lo demás guiSetVisible (Ventana, true) ShowCursor (verdadero) extremo final bindKey ( "F2", "abajo", para abrir) - Funciones ------
  17. Una pregunta un poca tonta, pero en fin. Mi problema es éste: function key() setElementPosition(theObject, x+1,y,z) end for i,v in ipairs(getElementsByType("player")) do bindKey(v,"w","down",key) end El objeto se mueve hacia adelante, pero solo una vez, o sea, preciono 'w' una vez y se mueve, pero si preciono la tecla de nuevo no pasa nada, no sé si es porque estoy haciendo un for para sacar al jugador, pero si pongo ' source ' me da error.