Jump to content

Search the Community

Showing results for tags 'timer'.

  • 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
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 25 results

  1. السلام عليكم ورحمة الله بركاتة كيف حال الشباب ان شاء اللـه تكونو في أتم الصحة والعافيه استفساري القوي (بنسبة لي ههه) هو كيف اسوي دالة مثل setTimer C++ بال او اذا كان في من الاساس ايش هي
  2. Gostaria de adicionar uma contagem no código que estou mexendo da seguinte maneira , quando o jogador da acl POLICIA desse o comando /armas ele receberia armas , mas se ele desse o comando novamente ele so poderia pegar depois de 30 minutos . Consegui fazer isso , mas quando o jogador sai do servidor e ao entrar novamente e realizar o mesmo comando , ele consegue pegar as armas sem ter passado os 30 minutos.
  3. Hi guys! Im kindda new at scripting, I ask your help! I want to set a timer what counts somewhere on the screen and when its up then I'll be killed. I also want it to be restarted after respawning. Thank you for your help in advance! :(
  4. Hello, I need a marker timer script which starts a timer on screen for that player who hit marker X and stopped when that player hit marker Y. And when that player hits marker X again without hitting marker Y, it restarts/reset timer again. Help me pls.
  5. Olá estou tentando fazer para quando o jogador encostar do marker vai desabilita todos os acesso para ele não conseguir se movimenta ai tudo bem, so que depois de colocou um setTimer para que pode voltar os controle do jogador mas está dando esse erro http://prntscr.com/lx94uf e não tenho a menor ideia de como arruma-lo server-side function Start_Bus(marker, md) if isPedInVehicle( source ) then if md then if marker == Rota1_Vermelha then setElementVisibleTo( Rota1_Vermelha, source, false ) setElementVisibleTo( Rota1_Blip, source, false ) setElementVisibleTo( Rota2_
  6. I have this: function Salir() if isElement(tableVehicles[source]) then destroyElement(tableVehicles[source]) end end addEventHandler("onPlayerVehicleExit",getRootElement(),Salir) This function destroys the vehicle when the player leaves, I want this to happen after a second and not immediately, i need to use "Set timer", but I do not know how to use it, I tried different ways but none of them
  7. Hi there! I've been trying to make a script for vehicle engine starter. My idea is, that player would have to hold down a key for 2 seconds and then the engine would start. Is there anybody that can help me with this please?
  8. Buenas, les quería comentar que recientemente he intentado poner un timer sin exito para el drop, lo que yo quiero es que al poner el comando /drop en say, automáticamente se active un timer para que por si el jugador vuelve a tipear el comando deba esperar 5 segundos para volver a hacerlo, de esa manera no me harían un masivo floodeo con el comando, y ademas de eso el comando /drop queda bindeado con la tecla de "backspace" he buscado si en el archivo del teleport estaba la linea del bind pero no la encontré y a la hora de escribir o hacer ciertas cosas con otros resources se vuelve molesto a
  9. Hey guys. I tried to killTimer after a player gets back to his jobcar. But it doesn't work for me. there isn't even a outputChatBox (I tried it out but deleted it for this showing) local Timer= setTimer( function () JobIcon=createBlip(1611.9,-1891.8,13.60,40, 1, 0, 0, 0, 255, 0, 99999.0) outputChatBox("Der Job wurde beendet!",myPlayer,255,0,0) destroyElement(jobcar) destroyElement(markers1) end,5000,0) end addEventHandler("onPlayerVehicleEnter",getRootElement(), function(vehicleID,leftSeat,jackerPlayer) local
  10. function refre:~emLoots () for i, loots in ipairs(getElementsByType("colshape")) do local itemloot = getElementData(loots,"itemloot") if itemloot then local objects = getElementData(loots,"objectsINloot") if objects then if objects[1] ~= nil then destroyElement(objects[1]) end if objects[2] ~= nil then destroyElement(objects[2]) end if objects[3] ~= nil then destroyElement(objects[3]) end end destroyElement(loots) end end triggerEvent("onServerRespawnTrees",root) insertIntoTableResidential() createPickupsOnServerStart() setTimer(re
  11. This is the code: function stimers(thePlayer) if getElementData(thePlayer,"asdasd") == true then local lejartimer1 = setTimer(function() exports.fly_box:showBox (thePlayer,"info","10 mins!") local lejartimer2 = setTimer(function() exports.fly_box:showBox (thePlayer,"info","9 mins!") end,60000, 1) local lejartimer3 = setTimer(function() exports.fly_box:showBox (thePlayer,"info","8 mins!") end,120000, 1) local lejartimer4 = setTimer(function() exports.fly_box:showBox (thePlayer,"info","7 mins!") end,180000, 1) local lejartimer5 = setTimer(function() exports.fly_box:showBox (thePlayer,"info"
  12. Hello. I want create a dx timer which when the player disconnect, and connect again to the server then not reset the timer. Sorry for my bad english :c
  13. xMKHx

    Remaining Time

    Hello, i'm working on a VIP Script, its important in RPG Servers Well i made the full script, i can give anyone vip and remove it but still one thing, its the timer, peoples call it vip hours! I want to make an expired date or something like that, i mean i will give someone 100 hours of vip, and after 100 hours the vip will be removed from him, i think you understand what i mean
  14. i have this code: setTimer(function() local arfolyam = math.random(200,5130) outputChatBox("Jelenlegi árfolyam: "..arfolyam) end, 500, 0) GUIEditor.window[1] = guiCreateWindow(0.35, 0.31, 0.31, 0.28, "Aranykereskedés", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(0.02, 0.59, 0.95, 0.14, "Az arany jelenlegi árfolyama: "..arfolyam, true, GUIEditor.window[1]) but i get this error in debugscript 3: attempt to concatenate global 'arfolyam' ( a nil value) what wrong? how to fix this?
  15. So, i have a problem, im making a script for replacing sounds of cars, the first car i enter works nice, when i change engine state the sound goes off and on but when left a car on with the replaced sound and try to enter to another car and start the engine, it plays the sound on the last car, so if you do this with more cars, the first car plays a lot of sounds. Sorry my english is a bit :~ty cause im spanish. Heres some lua code, server side local wayfarerenginestate = 0 local timerwayfarersound = {} function OnEnterVehicle ( thePlayer, seat, jacked ) if getElementModel
  16. Hi, can you help me? I want this animation to start and stop at 5 seconds and at 10 seconds to return the animation function animacion(source) setPedAnimation( source, "ped", "gas_cwr") setTimer(pararanim,5000,1) end addCommandHandler ("toxic", animacion) function pararanim(tp) setPedAnimation(tp,false) setTimer(animacion,3000,1) end addCommandHandler ("parar", pararanim) setPedAnimation( source, "GANGS", "prtial_gngtlkB", 1, false, true, true, true, false ) setTimer(function() setPedAnimation(source, false) end, 1000, 1) Try doing it with timers but not
  17. Hi, I'm creating a SQL-based currency system script, I put a setTime to generate coins at a certain time for certain players, however, I need to destroy this setTime when the player clears, I already did something to do that, However, when the player clears and setTime is destroyed, everyone's time is destroyed, not just the user who logged out. I need that when certain user is logged off, only his setTime is canceled ... does anyone have any idea what I can do? Starting time: function startFunction(_,thePlayer) tempo = setTimer ( function() ...code... end, 2000, 0 ) end
  18. So hello, I maked a script, when i teleport with my command "sf" or "lv" or even "ls" when I'm in a car, I never teleport, but when I'm standing I doo teleport, soo how to do a teleportation with a car that worked when im in car and when im on foot, and i want to add a timer when i say "ls" and on the screen shows "3 seconds until a teleportation", and when hit by a player or a car, stop it by 1 sec and continue it. commando = { } laikas = 5000 function Tele( playerSource ) if (commando[playerSource]) then end setElementPosition(playerSource, 1518.88757, -1668.16504, 13.54688) comma
  19. local countdown = 120 G3 = guiCreateLabel(0.49, 0.67, 0.03, 0.02, tostring(countdown).." mp", true) guiSetFont(G3, "default-bold-small") guiSetVisible(G3,false) addEventHandler("onClientGUIClick",root, function () if source == buttonGuest then removeEventHandler("onClientRender",root,a123) addEventHandler("onClientRender", root, dxhavendeg) guiSetVisible(buttonLogin,false) guiSetVisible(buttonRegister,false) guiSetVisible(buttonGuest,false) guiSetVisible(editPassword,false) guiSetVisible(editUsername,false) setTimer(function () countdown = countdown - 1 if countdo
  20. function countdownFin() removeEventHandler("onClientRender", root, eventszamlalas) end local countdown = setTimer(countdownFin, 5000, 1) local screenW, screenH = guiGetScreenSize() function eventszamlalas() local x = getTimerDetails(countdown) local timeLeft = math.ceil(x/1000) dxDrawLine((screenW * 0.4111) - 1, (screenH * 0.1244) - 1, (screenW * 0.4111) - 1, screenH * 0.1589, tocolor(254, 254, 254, 255), 1, false) dxDrawLine(screenW * 0.6118, (screenH * 0.1244) - 1, (screenW * 0.4111) - 1, (screenH * 0.1244) - 1, tocolor(254, 254, 254, 255), 1, false) dxDrawLin
  21. Good day! This is my code where the objective is to set the player wanted level. After increasing the wanted level, I want to create a timer in order to start decreasing it. The problem is that in my code, at each wanted level increase, it creates a timer, which is pretty annoying. The thing is, how can I check if there is a timer and destroy it, before starting the new one? I thought I did that, but the code is not working! function setWantedLevel(player) local wantedLevel = getElementData(player,"wantedLevel") if wantedLevel == 10 then setElementData(player,"wantedLevel",10,true)
  22. Hey i make this script when you have low fuel to start a sound alarm but i don't know how to make to check this when you are in helicopter : function helicopter () if ( isPedInVehicle ( localPlayer ) == false ) then return false end ---------------------------Parts----------------------- local veh = getPedOccupiedVehicle(getLocalPlayer()); local maxfuel = ---myStuff--; local fuel = ---myStuff----------; if (isElement(veh) and getElementModel(veh) == 487 or 497 or 417 or 563 ) then if fuel <= 5 then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.2)
  23. Well...I need to freeze a player during 3 seconds when he collides a ColCuboid, independent if he is in a vehicle or not. After this time, the player is unfreezed and will be only freeze again if he goes out the collider and enters it again. The collider is on a serverside script, but I read at the "Wiki MTA" an information that Freeze commands are only clientside... I tried to make all the script clientside but when I did, the script simply doesn't work and don't show any error. Reason: The player must wait the gate's movement ending so he can pass. The gate's movement lasts
  24. addEventHandler("onClientRender", root, addEventHandler("onClientGUIClick", GUIEditor.button[1], function() text1 = guiGetText(GUIEditor.edit[1]) --text2 = guiGetText(valasz1) --text3 = guiGetText(valasz2) if text1 ~= "" then --triggerServerEvent("server",localPlayer,text1) dxDrawText(text1, (screenW * 0.2924) + 1, (screenH * 0.3778) + 1, (screenW * 0.7014) + 1, (screenH * 0.5400) + 1, tocolor(0, 0, 0, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) dxDrawText(text1, screenW * 0.2924, screenH * 0.3778, screenW * 0.7014, screenH * 0.5400, tocolor(255, 0, 0,
  25. Hola :v quisiera que me ayudaran con algo. Quiero hacer que cuando un usuario se pare en un marker, se inicie un contador hasta X número y al llegar al límite se active otra función (eso último ya lo hice), pero que cuando se salga del marcador el contador se detenga (cosa que haría que no se ejecutara tal función), luego cuando el usuario vuelva a entrar el contador se inicie desde 0 hasta llegar a X número. Podrían hacerme ese favor?
  • Create New...