Jump to content

Search the Community

Showing results for tags 'mta'.

  • 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

  1. How to check the recoil of a weapon. Notice that when you shoot, for example, with an ak47, it starts with a slight recoil and after 3 seconds when you hold it, you have a large recoil and it stops at this recoil, then the bullets fly in all directions when you are, for example, on poor level. Therefore, is there something to check the recoil of a given weapon so that the int changes at the time of the initial recoil and the final recoil? Maybe the getWeaponProperty function but I don't see anything that could check it because "spread" for example stops on the same recoil.
  2. Hello, I recently returned to making a server after a year and I wanted to remind myself how the "source", "root", "this", "sourceResource", "sourceResourceRoot", "client" etc. Elements worked. Unfortunately, when I checked the MTA wiki, I didn't understand any of these elements. In general, the best help would be if someone explained to me how these elements work on examples for AddEventHandler because in mta wiki there is only one example for a "source" and I guess "root"? element
  3. Boa noite, gostaria de saber se tem solução o bug do "MODO GHOST ATIVADO" que fica floodando no chat pelo sistema de ativo e passivo, revirei toda a internet e nao achei nenhum script que nao de esse bug, todos ativos e passivos que achei dão esse problema, e são todos compilados alguma solução??
  4. Estou com um erro em um codigo de colisão entre veiculos, podem me ajudar? Ele inicia tudo ok, os carros n se batem, mas ai passa uns minutos e da erro no setElementCollidableWith(vehicle, v, false) function ghostmode_on() local v = getPedOccupiedVehicle(localPlayer) -- Get her's Vehicle ID for index,vehicle in ipairs(getElementsByType("vehicle")) do --LOOP through all Vehicles setElementCollidableWith(vehicle, v, false) -- Set the Collison off with the Other vehicles. end end addEventHandler( "onClientResourceStart", root, ghostmode_on) Ai o erro:
  5. Hi All Are you looking for a freeroam server that has tons of custom mods and features, but don't want too many rules and restrictions? Then COOPERA Freeroam boredom just might be the right server for you! We have options like mapping and attaching for creative players, command line based so you actually can learn from it. We also have a lot of car mods and drifting opportunities to race yourself towards the finish! So, that's only a part of what our server can offer you, and if you are interested to check it out please copy the following link in your MTA: Server IP: mtasa://23.88.73.88:12641 LINKS : Join our forum site: https://powercs.ro/forum/ Vote Server : https://serverstoplist.com/server-coopera-powercs-ro-freeroam-server-18-564668 Server informatin : https://www.game-state.com/23.88.73.88:12641/
  6. Ola tudo bem? eu estava programando e veio a ideia de usar o setTimer ao invez do onClientRender porque notei diferença no ipb quando eu usava onClientRender o ipb dava x, ao usar setTimer o ipb dava metade do x so queria saber se existe algum problema fazer deste modo
  7. Eu ia colocar o nome do meu servidor de Maxximus Roleplay mais eu pesquisai e já existe uma cidade com de FiveM com esse nome vocês podem me ajudar?
  8. 《 Polski Serwer Służb Mundurowych 》 Cześć Graczu! Szukasz fajnego serwera MTA na którym chciałbyś pograć wspólnie ze znajomymi, i mile spędzić czas? Bardzo dobrze trafiłeś ! Przedstawiamy wam serwer "PSSM" jest to serwer RPG/RP! ——————————————— ????????? » Pomocną i doświadczoną administrację » Ciekawe Prace » Małe Zarobki » Eventy jakich jeszcze nie widziałeś » Bardzo dobrze rozbudowaną gospodarkę » Darmowe Premium » Podmianki » Zaawansowane systemy ——————————————— ?????????? » To jeszcze nie wszystko znajdziesz u nas na serwerze ! » Pozdrawia cała ekipa serwera Zaproszenie: https://discord.gg/uT4fQwkbsh
  9. http://mtasaturk.com/resim/sunucuadi.png [glow=red,2,300] Gökhan Gaming Freeroam [/glow] http://mtasaturk.com/resim/ipadresi.png mtasa://195.85.205.219:22003 http://mtasaturk.com/resim/yetkililer.png Sunucu Kurucuları Marewhy unk0wn http://mtasaturk.com/resim/slogan.png http://mtasaturk.com/resim/website.png Youtube https://www.youtube.com/channel/UCGFgKijKB62atkea8dNUGVA http://mtasaturk.com/resim/ozellikler.png En İyi Arabalar En İyi Motorlar En İyi Jantlar Araç Kayıt Sistemi En Şık ve Modern VIP Panel Uygun VIP Fiyatı Kamber Sistemi Tuning Sistemi Ve Daha Fazlası... http://mtasaturk.com/resim/resim.png http://mtasaturk.com/resim/video.png https://www.youtube.com/watch?v=-H-jB0T8Ih8 [move]Sunucumuza Gelmeyi Unutmayınız...[/move]
  10. alguém sabe me dizer como faço a definição de uma variavel especifica pra 1 player só? e não para todos? POR EXEMPLO: local VARIAVEL1 = false VARIAVEL1(thePlayer) = true (quero q a variavel 1 fique apenas para 1 jogador e não todos do servidor como faço essa definição? (sou novo no script lua) SCRIPT: local PlayerJoin = false addEventHandler ("onPlayerJoin", root, function () PlayerJoin [thePlayer] = true outputChatBox("Player Entrou.") end ) function Verification() if PlayerJoin[thePlayer] == true then outputChatBox("VARIAVEL TRUE") else outputChatBox("VARIAVEL FALSE") end end addCommandHandler("teste", Verification) @Lord Henry
  11. Hello everyone! I would like to try out some good and realistic Graphics Mode that is compatible with MTA and that I can use freely without being banned. Something like this: https://www.youtube.com/watch?v=8b4esMdWzP8
  12. Argentina Estilo Roleplay un servidor de Rol, somos una comunidad formada por usuarios de cualquier parte del mundo con ganas de divertirse, rolear, y hacer nuevas amistades. Nuestro servidor está basado en Argentina. ╔●▬▬Argentina Estilo Roleplay ▬▬▬▬●╗ ║ Trabajos Temporales-Granjero-Basurero-Correos-Repartidor ║ Mapeos Unicos ║ Vehiculos Reales ║ Rol Serio %100 ║ Facciones con postulaciones abiertas ║ Mafias y bandas ║ Sistema FPS Optimizados. ║ Servidor En Ford cartson ║ Rol 100% Argentino ║ Sistema De Mercado Negro ║ Sistema De Radar ║ facciones ilegales ║ Sistema Anti-Lag ║ Facciones Legales ║ Economía estable ║ Sistema De /curarse ║ Discord: https://discord.gg/MGMVFHRssf
  13. Olá estou com um problema com este resource de Painel de Sirene, o problema é o seguinte eu tenho markers no servidor para criar os veiculos que tenhem esse painel e tambem tem markers para os destruir, porem quando alguem destroi o veiculo com a sirene ou buzina ligada ela fica em loop sem parar ou seja o veiculo é deletado mas ela fica ali tocando Já tentei de todas as formas não consigo arrumar isso alguém pode ajudar? Client-side --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- local sx,sy = guiGetScreenSize() local screenW,screenH = guiGetScreenSize() local resW, resH = 1280, 720 local x, y = (screenW/resW), (screenH/resH) function dxsirenepainelsprp () local theVehicle = getPedOccupiedVehicle ( localPlayer ) if ( theVehicle ) then if getPedOccupiedVehicleSeat(localPlayer) == 1 or getPedOccupiedVehicleSeat(localPlayer) == 0 then if ( getElementModel ( theVehicle ) == 436 ) or ( getElementModel ( theVehicle ) == 490 ) or ( getElementModel ( theVehicle ) == 404 ) then dxDrawRectangle(screenW * 0.5477, screenH * 0.8151, screenW * 0.2350, screenH * 0.1471, tocolor(0, 0, 0, 255), false) dxDrawText("Painel Sirene", screenW * 0.3377, screenH * 0.8151, screenW * 0.9927, screenH * 0.8411, tocolor(255, 140, 0, 255), 1.00, "sans", "center", "center", false, false, false, false, false) if getElementData ( theVehicle, "vtrgiroflex" ) == false then dxDrawRectangle(screenW * 0.5550, screenH * 0.8867, screenW * 0.0637, screenH * 0.0417, tocolor(9, 9, 9, 180), false) else dxDrawRectangle(screenW * 0.5550, screenH * 0.8867, screenW * 0.0637, screenH * 0.0417, tocolor(255, 140, 0, 255), false) end if getElementData ( theVehicle, "vtrsirene" ) == false then dxDrawRectangle(screenW * 0.6319, screenH * 0.8867, screenW * 0.0637, screenH * 0.0417, tocolor(9, 9, 9, 180), false) else dxDrawRectangle(screenW * 0.6319, screenH * 0.8867, screenW * 0.0637, screenH * 0.0417, tocolor(255, 140, 0, 255), false) end if getElementData ( theVehicle, "vtrbuzina" ) == false then dxDrawRectangle(screenW * 0.7117, screenH * 0.8867, screenW * 0.0637, screenH * 0.0417, tocolor(9, 9, 9, 180), false) else dxDrawRectangle(screenW * 0.7117, screenH * 0.8867, screenW * 0.0637, screenH * 0.0417, tocolor(255, 140, 0, 255), false) end dxDrawText("1", screenW * 0.3468, screenH * 0.8672, screenW * 0.8287, screenH * 0.8867, tocolor(255, 140, 0, 255), 1.00, "sans", "center", "center", false, false, false, false, false) dxDrawText("2", screenW * 0.4212, screenH * 0.8672, screenW * 0.9056, screenH * 0.8867, tocolor(255, 140, 0, 255), 1.00, "sans", "center", "center", false, false, false, false, false) dxDrawText("3", screenW * 0.5023, screenH * 0.8672, screenW * 0.9854, screenH * 0.8867, tocolor(255, 140, 0, 255), 1.00, "sans", "center", "center", false, false, false, false, false) dxDrawText("Giroflex", screenW * 0.3500, screenH * 0.8932, screenW * 0.8214, screenH * 0.9206, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) dxDrawText("Sirene", screenW * 0.4322, screenH * 0.8932, screenW * 0.8953, screenH * 0.9206, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) dxDrawText("Buzina", screenW * 0.5103, screenH * 0.8932, screenW * 0.9780, screenH * 0.9206, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) end end end end addEventHandler ( "onClientRender", getRootElement (), dxsirenepainelsprp ) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- local vehiclesSirenes = {} addEvent("startSireneSound",true) addEventHandler("startSireneSound",root, function() local theVehicle = getPedOccupiedVehicle ( localPlayer ) if ( theVehicle ) then if(vehiclesSirenes[source])then destroyElement(vehiclesSirenes[source]) vehiclesSirenes[source] = nil setElementData(theVehicle, "vtrsirene", false) else setElementData(theVehicle, "vtrsirene", true) vehiclesSirenes[source] = playSound3D( "sirene.mp3", 0,0,0, true ) setSoundMaxDistance(vehiclesSirenes[source], 150 ) setSoundVolume (vehiclesSirenes[source], 0.1) attachElements (vehiclesSirenes[source], source, 0, 0, 0 ) end end end) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- local vehiclesSirene3 = {} addEvent("startSireneSound3",true) addEventHandler("startSireneSound3",root, function() local theVehicle = getPedOccupiedVehicle ( localPlayer ) if ( theVehicle ) then if(vehiclesSirene3[source])then destroyElement(vehiclesSirene3[source]) vehiclesSirene3[source] = nil setElementData(theVehicle, "vtrbuzina", false) else setElementData(theVehicle, "vtrbuzina", true) vehiclesSirene3[source] = playSound3D( "horn.mp3", 0,0,0, true ) setSoundMaxDistance(vehiclesSirene3[source], 100 ) setSoundVolume (vehiclesSirene3[source], 1.0) attachElements (vehiclesSirene3[source], source, 0, 0, 0 ) end end end) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Emergency Lights resource by vovo4ka -- please, do not remove copyright -- Edited by #FurkanOzulus [OzulusTR] -- Special Thanks, vovo4ka for the this script :) local strobo_interval = 5 -- strobo light freq. 10 = 0.5 sec local is_strobo_enabled = enable -- enable/disable stroboscopic lights mode -- lamps local flash_interval = 2 -- flash freq -- led blink mode local blink_interval = 20 -- blink interval local blink_duration = 2 -- 1..blink_interval local car_lights_table = { -- Enforcer [427] = {["mode"]="lamp", [1]={["pos"]={0.45, 1.1, 1.42}, ["color"]={255,0,0}, ["size"]=0.2, ["phase"]=10.0}, [2]={["pos"]={-0.45, 1.1, 1.42}, ["color"]={255,0,0}, ["size"]=0.2, ["phase"]=10.0}, [3]={["pos"]={0.22, 1.1, 1.42}, ["color"]={255,0,0}, ["size"]=0.2, ["phase"]=0.0}, [4]={["pos"]={-0.22, 1.1, 1.42}, ["color"]={255,0,0}, ["size"]=0.2, ["phase"]=0.0}, [5]={["pos"]={-1.18, 0.1, 0.94}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=0.0}, [6]={["pos"]={-1.18, -1.63, 0.94}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=5.0}, [7]={["pos"]={-1.18, -3.37, 0.94}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=10.0}, [8]={["pos"]={1.18, 0.1, 0.94}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=0.0}, [9]={["pos"]={1.18, -1.63, 0.94}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=5.0}, [10]={["pos"]={1.18, -3.37, 0.94}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=10.0} }, -- Elegant PassatVtr -- Police Speed [436] = {["mode"]="led", [1]={["pos"]={-0.5,-0.1, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [2]={["pos"]={0.5, -0.1, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [3]={["pos"]={-0.1, 0.1, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [4]={["pos"]={0.1, 0.1, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [5]={["pos"]={-0.6, -0.25, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [6]={["pos"]={0.6, -0.25, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [7]={["pos"]={-0.2,0, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [8]={["pos"]={0.2, 0, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, -- [17]={["pos"]={-0.5,-0.1, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [18]={["pos"]={0.5, -0.1, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [19]={["pos"]={-0.1, 0.1, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [199]={["pos"]={0.1, 0.1, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [188]={["pos"]={-0.6, -0.25, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [166]={["pos"]={0.6, -0.25, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [177]={["pos"]={-0.2,0, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [155]={["pos"]={0.2, 0, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, --=-=-=-- [40]={["pos"]={-0.77, 2.10, 0.10}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=1.0}, [41]={["pos"]={0.77, 2.10, 0.10}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=1.0}, [42]={["pos"]={-0.6, 2.26, 0.10}, ["color"]={0,0,255}, ["size"]=0.1, ["phase"]=0.0}, [43]={["pos"]={0.6, 2.26, 0.10}, ["color"]={0,0,255}, ["size"]=0.1, ["phase"]=0.0}, ----frente^ }, -- radio patrulha [404] = {["mode"]="led", [1]={["pos"]={-0.5,-0.1, 1.0}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [2]={["pos"]={0.5, -0.1, 1.0}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [3]={["pos"]={-0.1, 0.1, 1.0}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [4]={["pos"]={0.1, 0.1, 1.0}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [5]={["pos"]={-0.6, -0.25, 1.0}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [6]={["pos"]={0.6, -0.25, 1.0}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [7]={["pos"]={-0.2,0, 1.0}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [8]={["pos"]={0.2, 0, 1.0}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, -- [17]={["pos"]={-0.5,-0.1, 1.0}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [18]={["pos"]={0.5, -0.1, 1.0}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [19]={["pos"]={-0.1, 0.1, 1.0}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [199]={["pos"]={0.1, 0.1, 1.0}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [188]={["pos"]={-0.6, -0.25, 1.0}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [166]={["pos"]={0.6, -0.25, 1.0}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [177]={["pos"]={-0.2,0, 1.0}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, [155]={["pos"]={0.2, 0, 1.0}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}, --=-=-=-- [40]={["pos"]={-0.77, 2.16, -0.36}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=1.0}, [41]={["pos"]={0.77, 2.16, -0.36}, ["color"]={255,0,0}, ["size"]=0.1, ["phase"]=1.0}, [42]={["pos"]={-0.6, 2.36, -0.36}, ["color"]={0,0,255}, ["size"]=0.1, ["phase"]=0.0}, [43]={["pos"]={0.6, 2.36, -0.36}, ["color"]={0,0,255}, ["size"]=0.1, ["phase"]=0.0}, ----frente^ }, --------=========--------- -- FBI Rancher [490] = {["mode"]="lamp", [1]={["pos"]={0, 0.2, 0.9}, ["color"]={255,0,0}, ["size"]=0.4, ["phase"]=5.0}, [2]={["pos"]={0.4, 0, 0.9}, ["color"]={255,0,0}, ["size"]=0.4, ["phase"]=0.0}, [3]={["pos"]={-0.4, 0, 0.9}, ["color"]={255,0,0}, ["size"]=0.4, ["phase"]=15.0}, [4]={["pos"]={0.55, -0.2, 0.9}, ["color"]={255,0,0}, ["size"]=0.4, ["phase"]=7.0}, [5]={["pos"]={-0.55, -0.2, 0.9}, ["color"]={255,0,0}, ["size"]=0.4, ["phase"]=20.0} }, -- since 0.8 there are no default lights position, because only emergency and pre-defined vehicles can use lights --["default"] = {["mode"]="lamp", [1]={["pos"]={0.5, 0, 0.8}, ["color"]={255,0,0}, ["size"]=0.25, ["phase"]=0.0}, [2]={["pos"]={-0.5, 0, 0.8}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=10.0}} } -- do not modify -------------------------------------------- local vehicles = {} local timers = {} local base_freq = 50 -- freq of timer for light change ------------------------------------------------------------- function release_vehicle(vehicle) if (isElement(vehicle)) then if (is_strobo_enabled) then setVehicleOverrideLights ( vehicle, 0) setVehicleLightState ( vehicle, 0, 1 ) setVehicleLightState ( vehicle, 1, 1 ) setVehicleLightState ( vehicle, 2, 1 ) setVehicleLightState ( vehicle, 3, 1 ) end end if (vehicles[vehicle]~=nil) then -- release the markers for key, value in pairs(vehicles[vehicle]["flist"]) do destroyElement (value["m"]) end setElementData(vehicle, "vtrgiroflex", false) vehicles[vehicle] = nil end if (timers[vehicle]~=nil) then -- kill the strobo timer killTimer(timers[vehicle]) timers[vehicle] = nil if (isElement(vehicle)) then if (getElementData( vehicle, "emerlights_source")==getPlayerName(getLocalPlayer())) then triggerEvent ( "onPlayerEmergencyLightStateChange", getRootElement(), 0 ) end end end end function checkForAbility(vehicle) local veh_model = getElementModel ( vehicle ) if (car_lights_table[veh_model]==nil)or(getElementData( vehicle, "emerlights_enabled" )=="false") then return false end return true end function strobo_state_update (vehicle) -- check for valid vehicle if (isElement(vehicle)) then if (vehicles[vehicle]==nil) then -- check for disallowing to use lights -- its enabled by default if (checkForAbility(vehicle)==false) then release_vehicle(vehicle) return end local veh_model = getElementModel ( vehicle ) --if (car_lights_table[veh_model]==nil) then --veh_model = "default" --end setElementData( vehicle, "emerlights_source", src, false) if (src==getPlayerName(getLocalPlayer())) then triggerEvent ( "onPlayerEmergencyLightStateChange", getRootElement(), 1 ) end -- init state variable vehicles[vehicle] = {} vehicles[vehicle]["lstate"] = 0 -- strobo lights state vehicles[vehicle]["fstate"] = 0 -- flash light state vehicles[vehicle]["flist"] = {} -- flash lights list (marker ids) -- create flash lights local mode = car_lights_table[veh_model]["mode"] if (mode==nil) then mode = "lamp" end local coeff = 0 if (mode=="lamp") then coeff = 3.141592654/10.0 else coeff = blink_interval/20.0 end vehicles[vehicle]["fmode"] = mode for light_id, light_desc in pairs(car_lights_table[veh_model]) do if (light_id~="mode") then vehicles[vehicle]["flist"][light_id] = {} vehicles[vehicle]["flist"][light_id]["m"] = createMarker( 0.0001, 0.0001, 0.0001, "corona", light_desc["size"], light_desc["color"][1], light_desc["color"][2], light_desc["color"][3], 100) vehicles[vehicle]["flist"][light_id]["p"] = light_desc["phase"]*coeff attachElements ( vehicles[vehicle]["flist"][light_id]["m"], vehicle, light_desc["pos"][1], light_desc["pos"][2], light_desc["pos"][3] ) end end end -- strobo light if (is_strobo_enabled) then setVehicleOverrideLights ( vehicle, 2) if (vehicles[vehicle]["lstate"]<strobo_interval) then setVehicleLightState ( vehicle, 0, 1 ) setVehicleLightState ( vehicle, 1, 0 ) setVehicleLightState ( vehicle, 2, 0 ) setVehicleLightState ( vehicle, 3, 1 ) else setVehicleLightState ( vehicle, 0, 0 ) setVehicleLightState ( vehicle, 1, 1 ) setVehicleLightState ( vehicle, 2, 1 ) setVehicleLightState ( vehicle, 3, 0 ) end if (vehicles[vehicle]["lstate"]>=strobo_interval*2) then vehicles[vehicle]["lstate"] = 0 else vehicles[vehicle]["lstate"] = vehicles[vehicle]["lstate"] + 1 end end -- flash light if (vehicles[vehicle]["fmode"]=="lamp") then -- lamp mode local tmp_fstate = vehicles[vehicle]["fstate"] for key, value in pairs(vehicles[vehicle]["flist"]) do local R, G, B, A = getMarkerColor( value["m"] ) setMarkerColor(value["m"], R, G, B, (math.sin(tmp_fstate+value["p"])+1.0)*128.0) end vehicles[vehicle]["fstate"] = vehicles[vehicle]["fstate"] + flash_interval else -- led mode local tmp_fstate = vehicles[vehicle]["fstate"] for key, value in pairs(vehicles[vehicle]["flist"]) do local R, G, B, A = getMarkerColor(value["m"]) -- blinking mode local tmp_val = tmp_fstate+value["p"] if (tmp_val>blink_interval) then tmp_val = tmp_val - blink_interval end if ((tmp_val>=0)and(tmp_val<blink_duration))or((tmp_val>=blink_duration+1)and(tmp_val<blink_duration*2+1)) then setMarkerColor(value["m"], R, G, B, 255) else setMarkerColor(value["m"], R, G, B, 0) end end vehicles[vehicle]["fstate"] = vehicles[vehicle]["fstate"] + 1 if (vehicles[vehicle]["fstate"]>blink_interval) then vehicles[vehicle]["fstate"] = vehicles[vehicle]["fstate"] - blink_interval end end else -- if vehicle is no more exists release_vehicle(vehicle) end end function isStroboLightsOn (vehicle_id) if (timers[vehicle_id]) then return 1 else return 0 end end function setStroboLightsOn(vehicle_id, value) if ( vehicle_id ) then if (value==nil) then if (isStroboLightsOn(vehicle_id)==1) then value = 0 else value = 1 end; end; if (value==0) then if (timers[vehicle_id]) then release_vehicle(vehicle_id) end end if (value==1) then if (timers[vehicle_id]) then release_vehicle(vehicle_id) end -- create strobo timer timers[vehicle_id] = setTimer ( strobo_state_update, base_freq, 0, vehicle_id ) end end end -- only local effect function enableStroboLightsMode(source, value) if (value=="0")or(value=="false") then is_strobo_enabled = false --outputConsole("Stroboscopic mode disabled") else if (value=="1")or(value=="true") then is_strobo_enabled = true --outputChatBox("Stroboscopic mode enabled") else --outputChatBox("Usage: strobo 0 or strobo 1 for disable/enable stroboscopic lights mode") end end end addCommandHandler("strobo", enableStroboLightsMode) -- triggered by server function setEmerlightsState(value, state) local player = getPlayerFromName ( value ) local vehicle = getPedOccupiedVehicle(player) if (vehicle) then setStroboLightsOn(vehicle, state) end end addEvent("setEmerlights", true) addEventHandler("setEmerlights", getRootElement(), setEmerlightsState) function requestEmerlights() -- check for driver playerVehicle = getPedOccupiedVehicle (getLocalPlayer()) -- get the player's vehicle if (playerVehicle) then -- if player is not a driver if getPedOccupiedVehicleSeat(localPlayer) == 1 or getPedOccupiedVehicleSeat(localPlayer) == 0 then -- sync setElementData(playerVehicle, "vtrgiroflex", true) triggerServerEvent("requestEmerlightChangeState", getLocalPlayer(), 1-isStroboLightsOn(getPedOccupiedVehicle(getLocalPlayer()))) else -- not able to use lights for this vehicle --outputChatBox("unknown car!") end end end addCommandHandler("Strobo Light On", requestEmerlights)--stroboLightOn) bindKey("1", "down", "Strobo Light On") addEvent("onPlayerEmergencyLightStateChange") Server-Side --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- local viaturas = { [436]=true,[490]=true,[404]=true } function Sirene1(player,thePlayer,seat) local vehicle = getPedOccupiedVehicle(player) if(vehicle and viaturas[getElementModel(vehicle)])then if getPedOccupiedVehicleSeat(player) == 1 or getPedOccupiedVehicleSeat(player) == 0 then triggerClientEvent("startSireneSound",vehicle) setElementData(vehicle, "SireneTocando1", true) end end end function onResStart1() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "2", "down", Sirene1) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStart1) function onPlayerJoin1() bindKey(source, "2", "down", Sirene1) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoin1) function cleanAll1(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "2", "down", Sirene1) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAll1) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- local viaturas3 = { [436]=true,[490]=true,[404]=true } function Sireneamb2(player,seat) local vehicle = getPedOccupiedVehicle(player) if(vehicle and viaturas3[getElementModel(vehicle)])then if getPedOccupiedVehicleSeat(player) == 1 or getPedOccupiedVehicleSeat(player) == 0 then triggerClientEvent("startSireneSound3",vehicle) setElementData(vehicle, "SireneTocando2", true) end end end function onResStart3() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "3", "both", Sireneamb2) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStart3) function onPlayerJoin3() bindKey(source, "3", "both", Sireneamb2) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoin3) function cleanAll3(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "3", "both", Sireneamb2) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAll3) addEventHandler("onElementDestroy", getResourceRootElement(getThisResource()), function () local viaturas3 = { [436]=true,[490]=true,[404]=true } local vehicle = getPedOccupiedVehicle(player) if(vehicle and viaturas3[getElementModel(vehicle)])then for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "3", "both", Sireneamb2) unbindKey(player, "2", "down", Sirene1) if (getElementData(vehicle, "SireneTocando1") == true) then setElementData(vehicle, "SireneTocando1", false) triggerClientEvent("startSireneSound",vehicle) end if (getElementData(vehicle, "SireneTocando2") == true) then setElementData(vehicle, "SireneTocando2", false) triggerClientEvent("startSireneSound3",vehicle) end end end end) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- function onPlayerRequestEmerlight(value) triggerClientEvent(getRootElement(), "setEmerlights", getRootElement(), getPlayerName(source), value) end addEvent("requestEmerlightChangeState", true) addEventHandler("requestEmerlightChangeState", getRootElement(), onPlayerRequestEmerlight) --> Furkan Özulus <--
  14. Queria saber como faz para bloquear uma bind em um setTimer
  15. Danispace

    SD #4 RKE8

    So recently i reinstalled my PC, I had windows 11 before and still, except for now MTA is not working. I have no idea what could be modifying the process of mta, since i have nothing different other than what i had before, i have razer synapse etc... I tried reinstalling MTA on both my SSDs, reinstalled GTA:SA but nothing seems to work. I join local host and get kicked SD #4 RKE8, and on different servers too. FADD74F89263F9BEE73931EDAFB178A1 Multi Theft Auto v1.5.9-release-21334
  16. how to remove the flickering of a thunderstorm during a storm/rain? как убрать мерцания грозы во время шторма/дождя? I would like to remove this flickering due to the fact that the road is corny not visible and is constantly blinding хотел бы убрать это мерцание из за того что банально не видно дорогу и слепит постояно
  17. If you're an experienced Lua developer and are looking for work, feel free to send me a message. Details will be discussed privately. Best regards Vseven
  18. I found this video today from my mediafire account, I remember I joined this server between 2010 and 2012 (may not be exact), then the server closed down and I switched to DDC and finally stop at FFS Does anyone know the people named in this video, how are they now and are they still playing MTA From a player SEA with 350 ping :))
  19. Queria remover isso do chat quando entra no servidor, para o chat ficar clean
  20. Lately some injectable hacks for mta are appearing, coming from some Russians this is really possible apparently, if so is there any way to protect servers against this, or the mta itself may have a possible way to solve this?
  21. BoOoStEd

    Low FPS

    Hi! I'm having problems playing on RP servers. My laptop should handle MTA just fine, but I only get ~30 (Sometimes dropping to 10-20 while driving) and in interior ~40 FPS. What could be the problem? Laptop specs: I7-10870H on 4.5Ghz turbo GTX 1660 TI 24GB DDR4 ram MTA on NVMe SSD 1 Gbps network (I don't know if it matters, maybe in loading textures) Tried reinstalling the game, reinstalling MTA, installing older DirectX, changing settings, etc..
  22. Hello friends, today I will share with you a very simple and under development hud. To get rid of FPS and screen pollution, it is enough to install and run the hud I made on your server. Download > Link
  23. İP: mtasa://213.238.166.21:22003 GoodFellas Roleplay Kaliteli MTA:SA Roleplay Sunucusu Türk/Medium/Global/Sesli Discord Adresi:https://discord.gg/G3shD4ksMC
  24. Estou tentando por o addcommandhandler mas não consigo de forma nenhuma, se alguém tiver a solução para algum dos 3 scripts a baixo me avisa fznd o favor estou tentando abrir painel DX por comando ao em vez de por bindkey porem não consigo, já tentei de vários jeitos e formas porem nn vai, já pesquisei aqui no fórum, no YouTube porem nn vai function Pdx ( ) dxDrawRectangle(504, 197, 314, 397, tocolor(255, 0, 0, 100), false) dxDrawRectangle(554, 238, 218, 72, tocolor(255, 255, 255, 255), false) dxDrawRectangle(554, 347, 218, 72, tocolor(255, 255, 255, 255), false) dxDrawRectangle(554, 455, 218, 72, tocolor(255, 255, 255, 255), false) end function abrir (_,state) if painel == false then showCursor(true) addEventHandler("onClientRender", root, Pdx) painel = true else showCursor(false) removeEventHandler("onClientRender", root, Pdx) painel = false end end addCommandHandler("disappear", abrir) addCommandHandler("v", abrir) tabem tentei fazer uma versão para uma bussola: --2017 ~ Mark Gyori https://markgyori.eu/ --Contact: [email protected] local sx, sy = guiGetScreenSize() local top = 30 local font1 = dxCreateFont("font.otf", 11) local font2 = dxCreateFont("font.otf", 10) local exibir_bulssola = false local cords = { {0, "N"}, {15, 15}, {30, 30}, {45, "NE"}, {60, 60}, {75, 75}, {90, "E"}, {105, 105}, {120, 120}, {135, "SE"}, {150, 150}, {165, 165}, {170, "S"}, {195, 195}, {210, 210}, {225, "SW"}, {240, 240}, {255, 255}, {270, "W"}, {285, 285}, {300, 300}, {315, "NW"}, {330, 330}, {345, 345} } function draw ( ) local show = 15 local center = math.ceil(show / 2) - 1 local _, _, r = getElementRotation(getCamera()) local pos = math.floor(r / 15) local slotwidth = 40 local smooth = ((r - (pos * 15)) / 15) * slotwidth local left = sx / 2 - ((show + 2) * slotwidth)/2 for i=1, show do local id = i + pos - center if(id > #cords)then id = id - #cords end if(id <= 0)then id = #cords - math.abs(id) end if(cords[id])then local alpha = (tonumber(cords[id][2]) or 0 > 0) and 175 or 255 if(i < center)then alpha = alpha * (i/center) end if(i > center)then alpha = alpha * ((show-i)/center) end dxDrawRectangle(left + slotwidth * i - smooth + (slotwidth / 2 - 1) + 1, top + 10 + 1, 2, 10, tocolor(0, 0, 0, alpha * 0.5)) dxDrawRectangle(left + slotwidth * i - smooth + (slotwidth / 2 - 1), top + 10, 2, 10, tocolor(255, 255, 255, alpha)) dxDrawText(cords[id][2], left + slotwidth * i - smooth + 1, top + 20, left + slotwidth * (i+1) - smooth + 2, top + 40, tocolor(0, 0, 0, alpha * 0.5), 1, font2, "center", "center") dxDrawText(cords[id][2], left + slotwidth * i - smooth, top + 20, left + slotwidth * (i+1) - smooth, top + 40, tocolor(255, 255, 255, alpha), 1, font2, "center", "center") end end dxDrawText("➤", left + 4, top + 26 + 2, left + ((show + 3) * slotwidth) + 30, 0, tocolor(0, 0, 0, 160), 1, font1, "center", "top", false, false, false, false, false, 90) dxDrawText("➤", left, top + 26, left + ((show + 3) * slotwidth) + 30, 0, tocolor(255, 255, 255, 255), 1, font1, "center", "top", false, false, false, false, false, 90) end addCommandHandler("m1", function() if exibir_bulssola = false then addEventHandler("onClientRender", getRootElement(), draw) exibir_bulssola = true else removeEventHandler("onClientRender", getRootElement(), draw) exibir_bulssola = false end end) --->--->--->---> (inclusive tentei mudar a direção a qual ele gira não consegui se alguém souber como avisa)<---<---<---<--- e também tentei para ativar e desativar primeira pessoa na arma através de comando: function zoomarma (thePlayer) setWeaponProperty ( 30 , "poor" , "flag_aim_1st_person" , true ) setWeaponProperty ( 30 , "std" , "flag_aim_1st_person" , true ) setWeaponProperty ( 30 , "pro" , "flag_aim_1st_person" , true ) end addCommandHandeler ("m1", zoomarma ) esse addCommandHandeler não funciona de jeito nenhum
  25. Hi, I set up an mta server on a virtual server, but all players ping over 100. I pinged my virtual server using the speed test site and the result was 11. And I also tested my own ping and got ping 8 What should I do, the firewall and antivirus server are also turned on. Virtual server information 16 GB RAM 4 CORE
×
×
  • Create New...