Jump to content

Search the Community

Showing results for tags 'destroy'.

  • 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
    • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 7 results

  1. Lalalu

    Ped Saving

    Hello, how can I create a PED that when players killed It reappears the next day or at 12 hrs? That it does not appear when you reconnect on the server, only the next day or at specific time.
  2. Hello, I made a script wich creates an object with some properties. The problem is when I crash my car with the object, the object breaks. It breaks like a fence. There is some function to make the object invincible to car crashes? I created the object in server-side. Thanks.
  3. Quando utilizo: function aoSair(player) outputChatBox("| AVISO | você tem 30 segundos para voltar ao veículo.", player, 255,255,255, true) setTimer (function ( ) destroyElement(source) end, 30000, 1) end addEventHandler("onVehicleExit", getRootElement(), aoSair) o veículo não se destrói. Erro: Expected element at argument 1, got nil. Imagino que o erro aconteça porquê depois do jogador sair, source não é mais veículo, mas não sei como resolver. Outra coisa, estou usando esse método de destruir porque não consigo achar outra opção (sou novato em script). Queria que o veículo retornasse ao seu lugar padrão depois de 30 segundos: pegarEmprego = createMarker(1847.2760009766,-1873.8081054688,12.878125, "cylinder", 2, 255,255,255, 100) ped = createPed(20, 1847.7249755859,-1873.9541015625,13.578125, 90, false) setElementFrozen(ped, true) function mule(BVOMule) car1 = createVehicle(414, 1780.3957519531,-1889.2502441406,13.38960647583,-0, 0, 268.3544921875) car2 = createVehicle(414, 1780.3957519531,-1889.2502441406-5,13.38960647583,-0, 0, 268.3544921875) car3 = createVehicle(414, 1780.3957519531,-1889.2502441406-10,13.38960647583,-0, 0, 268.3544921875) end addEventHandler("onResourceStart", resourceRoot, mule) function aoEntrar(player) skin = getElementModel(player) gEM = getElementModel(source) if ( gEM == 414 ) then if skin == 20 then if getElementData(player, "Entregador") then else outputChatBox("| SERVIÇO | você precisa estar com a skin.", player) cancelEvent() end else end end end addEventHandler( "onVehicleStartEnter", getRootElement(), aoEntrar ) function msgEmprego(hitElement) if getElementType(hitElement) == "player" then if getElementData(hitElement, "Entregador") == false then outputChatBox("#ffffff| EMPREGO | digite #ff0000/conversar #ffffffpara conversar com o entregador.", hitElement, 255,255,25, true) end end end addEventHandler("onMarkerHit", pegarEmprego, msgEmprego) function aoSair(player) outputChatBox("| AVISO | você tem 30 segundos para voltar ao veículo.", player, 255,255,255, true) setTimer (function ( ) destroyElement(source) end, 1000, 1) end addEventHandler("onVehicleExit", getRootElement(), aoSair) function conversarComEntregador(playerSource) if isElementWithinMarker(playerSource, pegarEmprego) then if getElementModel(playerSource) == 20 then outputChatBox("#ffffffENTREGADOR: você já está com a roupa de entregador, pode trabalhar.", playerSource, 255,255,255, true) else outputChatBox("#ffffffENTREGADOR: lhe dei a roupa de entregador, pode ir trabalhar.", playerSource, 255,255,255, true) setPlayerSkin(playerSource, 20) setElementData(playerSource, "Entregador", true) end end end addCommandHandler("conversar", conversarComEntregador)
  4. 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 Destroy time: function playerOff(thePlayer) ...code... if isTimer ( tempo ) then killTimer ( tempo ) end end addEventHandler("onPlayerQuit", getRootElement(), playerOff) addEventHandler("onPlayerLogout", getRootElement(), playerOff)
  5. addEventHandler ( "onPlayerVehicleExit", getRootElement(), function(player) if isPedInVehicle (player) then local theVehicle = getPedOccupiedVehicle(player) if getVehicleType(theVehicle) == "Train" then destroyElement(trailer) destroyElement(trailer2) destroyElement(trailer3) outputChatBox("#FFffFFElhagytad a mozdonyt. A vagonok törlődtek!", player, r,g,b, true) end end end ) Warning: Bad argument @ 'isPedInVehicle' [Expected ped at argument 1, got vehicle] how to fix this?
  6. How to destroy a marker? I did not find any function to do this. i use destroyElement(markerName)
  7. Hello everyone. I need to destroy a vehicle that is idle for 60 seconds (Freeroam already has this function, so this part is unnecessary to make.) It starts counting when the vehicle becomes totally empty, (with no driver and no passengers), if someone enters in it before 60 seconds (as passenger or driver), the counting stops and restarts when the vehicle becomes empty again.) (Freeroam already works like this.) BUT If the car is from a .map, it need to be respawned to its original position on the map. Else if the car was created by a player (F1, command, Admin Panel, scripts, etc) so it will be destroyed. How can I differentiate the vehicles created by the .map from those created by the players? Also, when the vehicle gets exploded: if it is from a .map it will respawn after 10 seconds, else if was created by a player it will be destroyed after 10 seconds. I have a little script that respawn all vehicles that have been exploded. But it respawns all the vehicles created by players too... -- 1 second = 1000 function respawnExplodedVehicle() setTimer(respawnVehicle, 10000, 1, source) end addEventHandler("onVehicleExplode", getRootElement(), respawnExplodedVehicle)
×
×
  • Create New...