Jump to content

Search the Community

Showing results for tags 'server'.

  • 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. Всем привет! Я решил сделать телефон. Как мы знаем, чтобы создать картинку на экране, нам нужен клиент. Но, так как основная часть на сервере, нужно вызвать клиентскую функцию на сервере. Вроде как сделал всё правильно (скриншоты можете видеть ниже), но не работает: картинка не появляется. В консоле никаких ошибок не выводится. Можете, пожалуйста, помочь с этой ошибкой? Сервер Клиент
  2. (Sorry if the text contains errors, I'm Russian). Hello! I decided to make a telephone. As we know, in order to create a picture on the screen, we need a client. But, since the main part is on the server, you need to call the client function on the server. It seems like I did everything right (you can see the screenshots below), but it does not work: the picture does not appear. No errors are displayed in the console. Can you please help with this error? Server Client
  3. How to call a lua script function from a site? I don’t know what POST request to send to the server to get a response! I'm trying to do it like this: [LUA] function MTACheck(user) account = getAccount(user) if account then return "OK" else return "ERROR" end end [PYTHON] import requests ipp = '4*.17*.4*.4*:3***2' # it's my IP:PORT server adress user = '6E860E******************8E0F65F2' #it's my login from server req = requests.post(f'http://{ipp}/payment/call/MTAPaymentCheck', data = {'user': f'{user}'}) print( str(req.text) ) Received from the server: Access denied, please login
  4. Hey Gang, I'm Rainer from xgamingserver. We recently started hosting GTA server and one of our popular mods is MTA SA with prices starting at $15 p.m Below are some of the things that made Xgamingserver stand out. 2 days free trial for MTA SA server No fixed game slots. Game servers are hosted on Ryzen 7 CPUs Our gaming servers are located in North America and Germany Anti-DDoS Protection Automated cloud backups MySql Database Mod Manager Professional Anti-DDoS Protection Powerful Control Panel will come with power packed features. Other game servers that we hosting such as altV, SAMP, RageMP, TF2 Server Minecraft, and voice server such TeaSpeak servers. So looking for a host? Come and spin a server with us at xgamingserver.com/gta-mta-sa-server-hosting we also have Valheim Server Hosting and Jaws Of Extinction
  5. These 3 cars could be yours, if you are a SV owner or if u play as a VIP User etc... | Estos vehiculos pueden ser tuyos, si eres un visionario dueño de SV o si juegas como VIP dentro. You can talk with the sv´s Admin to install those inside the SV to your PJ | Puedes negociar con el administrador que te los coloque a tu PJ en el SV. I have the RAR archive | Tengo el archivo RAR - Toyota Land Cruiser Prado 2020 HD Model - Audi A7 Sline 2017 HD Model - Ferrari 1995 F50 HD Model Pay info: $20 Per Car / $20 por auto (Via PayPal ) | Bitcoin / Ether Accepted!! Requirements: Have Paypal or BTC Wallet Take a look to those images / Imagenes en el URL
  6. Sou iniciante em lua e estou tentando criar um script que faça com que quando o player esteja no "ModoPassivo" e pegue um veículo, o veículo dele fique blindado, e quando ele saia do "ModoPassivo" o veículo fique normal. Acontece que simplesmente não funciona. Alguem poderia me ajudar apontando onde errei ou algo do tipo? Server: function test47 (thePlayer) if getElementData ( thePlayer, "ModoPassivo" ) == true then local theVehicle = getPedOccupiedVehicle (thePlayer) if theVehicle and isElement (theVehicle) then setVehicleDamageProof (theVehicle, true) else setVehicleDamageProof (theVehicle, false) end end end
  7. Im working on a script wich create flames on the Thrusters of a vehicle (Mammoth Thruster of GTA Online), works well if you are the only that has a Thruster, but if someone also has a Thruster and gets out the vehicle, your Thruster will keep the attached elements and will not destroy the flames if you get out of the vehicle: Here is a video of what is happening: https://www.youtube.com/watch?v=Q3z9fdnBG0w and serverside and clientside scripts that are involved Serverside: (Functions for creating the flames) function LightOn(vehicle, x, y, z) if thePlayer ~= localPlayer then return end light = createMarker ( x , y , z, "corona", 0.5, 255, 160, 0, 170 ) attachElements(light, vehicle, 0, -0.3, -0.8) end addEvent("lighton", true) addEventHandler("lighton", getRootElement(), LightOn) function LightOff() if thePlayer ~= localPlayer then return end if light then destroyElement(light) end end addEvent("lightoff", true) addEventHandler("lightoff", getRootElement(), LightOff) function ThrustersOn(vehicle, x, y, z) if thePlayer ~= localPlayer then return end superhitbox = createObject (3471, x , y , z) setElementAlpha(superhitbox, 0) firethrustl = createObject (2031, x , y , z) firethrustr = createObject (2031, x , y , z) attachElements(superhitbox, vehicle, 0, -10, -1) attachElements(firethrustl, vehicle, 0.47, -0.4, -0.2) attachElements(firethrustr, vehicle, -0.47, -0.4, -0.2) setElementCollisionsEnabled(firethrustl, false) setElementCollisionsEnabled(firethrustr, false) end addEvent("thrusterson", true) addEventHandler("thrusterson", getRootElement(), ThrustersOn) function ThrustersOff() if thePlayer ~= localPlayer then return end if not firethrustl then return end destroyElement(firethrustl) destroyElement(firethrustr) end addEvent("thrustersoff", true) addEventHandler("thrustersoff", getRootElement(), ThrustersOff) Clientside: (Functions that triggers serverside events when you are in the Thruster) Thruster = 465 function SitOnThruster(thePlayer) if thePlayer ~= localPlayer then return end local vehicle = getPedOccupiedVehicle(localPlayer) if ( vehicle and getElementModel (vehicle) == Thruster ) then bindKey("vehicle_fire", "down", shootProjectile) triggerServerEvent ( "onthruster", resourceRoot) local x, y, z = getElementPosition(vehicle) local h, m = getTime() triggerServerEvent("thrusterson", getRootElement(), vehicle, x, y, z) if h > 20 then triggerServerEvent("lighton", getRootElement(), vehicle, x, y, z) else return end end end addEventHandler ( "onClientVehicleEnter", root, SitOnThruster ) function Notsit(thePlayer) if thePlayer ~= localPlayer then return end if Thruster then triggerServerEvent("thrustersoff", getRootElement(), vehicle, x, y, z) triggerServerEvent("lightoff", getRootElement(), vehicle, x, y, z) else return end end addEventHandler ( "onClientVehicleExit", root, Notsit ) function killed() if Thruster then if (isPedInVehicle(localPlayer) and Cars[getElementModel(getPedOccupiedVehicle(localPlayer))]) then if getPedOccupiedVehicleSeat ( localPlayer ) == 1 then return end triggerServerEvent("thrustersoff", getRootElement(), vehicle, x, y, z) triggerServerEvent("lightoff", getRootElement(), vehicle, x, y, z) else return end end end addEventHandler ( "onClientPlayerWasted", localPlayer, killed ) function shootProjectile() if not disparado then local vehicle = getPedOccupiedVehicle(localPlayer) if ( vehicle and getElementModel (vehicle) == Thruster ) then if isVehicleOnGround(vehicle) == false then local x, y, z = getElementPosition(vehicle) projectile = createProjectile(vehicle, 15, x, y+4, z-10) disparado = true setTimer ( function() disparado = false end, 1500, 1 ) else local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 15, x, y, z-3) disparado = true setTimer ( function() disparado = false end, 1500, 1 ) end end end end I'm very confused, i'm trying to make the script only create element for each player.
  8. Hello guys, what's up? Carlos from TimberHost here bringing some news. In first place I would like to wish Mery Christimas and a Happy New Year in advance to everyone. I just ask you to be careful because the pandemic is still there and nobody wants to get covid, right? Well, having said that, let's continue. Our company has a series of news on the MTA Host and I'm passing by to show you. Let's go! 2-day trial plan Low latency servers Super Download + Mods Compactor pro TeaSpeak for free on every plan Mod Manager MySql Database Channel for advertisements on Facebook and Discord Professional Anti-DDoS Protection TCAdmin Management Panel Are you interested in our company? Visit us at the links below - Website: https://timberhost.com.br - Discord: https://timberhost.com.br/discord - TeaSpeak: ts3.timberhost.com.br - Facebook: https://www.facebook.com/timberhost - Instagram: https://www.instagram.com/timberhost.br/ Oops: Welcome to Timber!
  9. Quiero comenzar un nuevo servidor en MTA sobre Roleplay, pero la verdad no tengo ni idea de como debo hacerlo. No sé si debo gastar dinero en algo, no sé si debo saber programar, etc... Me ayudan por favor?
  10. I contacted the owner when the foreign server that I played with pleasure a few years ago, when the man told me that he will sell the server, I wanted to buy the money and bought the server with my team, we reopened the server with 40 50 active players, we are selling the server that we continue with mta. I am sharing, there are people waiting for this server to be opened at the moment. You cannot see the modes on the server on another server... Price: 40$ Discord: Murphy#7164
  11. Olá, Estou Aqui para Apresentar Meu Novo e Primeiro Projeto de um Servidor Roleplay, Só que Sem a Chatice do Pique pega entre Policia e Ladrão, No Meu Servidor Terá Profissões Variadas (Até Agora Possuímos: Caminhoneiros, Mecânico, Mineradores, Paramédicos[Em Progresso], Piloto, Policia[Em Progresso] e Piloto Paramédico[Em Progresso].) Temos também um Sistema de Tuning único e Variado (Já que não usamos Veículos Modificados, o que Implica na leveza do Server e Também do Cliente!) Além Da Cidade SART City!, (é surpresa...) Estamos Desenvolvendo e Evoluindo o Servidor Cada Dia Mais! Por Enquanto Está em Fase Beta de Desenvolvimento, Mas Caso Queira ter a Chance de Experimentar o Server Basta Entrar em Nosso Server do Discord! Nos Encontramos Lá! [SART]//Virus~ [Brasil SART City] - Discord
  12. All Credits Goes to First developer team in PTPM This is the Protect the Prime Minister server created earlier by the ptpm open source project. What is the PTPM Protect the Prime Minister(PTPM) is a team based gamemode that promotes teamwork and strategy over the conventional deathmatch tactics. It was first created in SA-MP in mid 2006 and ran as a successful server for several years, but later migrated and was reimplemented in the more powerful Multi Theft Auto engine. The aim for the Good Guys is to protect the (PM) for the duration of the round. The aim for the Bad Guysis to kill the PM before the end of the round. General PTPM gameplay can be thought of as an open world attack and defend. Often, the Good Guys will choose a location in the map to defend and the Bad Guys will assault it and attempt to kill the protected Prime Minister. If the PM leaves the hideout and heads out into the roads, the Bad Guys will hunt him down while the Good Guys attempt to keep them away. Rounds usually last for 15 minutes, depending on the map. You can see the time left on the timer in the top center of the screen. The round will end if one of the following happens: The round timer reaches 0:00 Prime Minister is Killed Once the round is over you will be able to vote on the next map, and after a short transition period the new map will begin. How to play The game has several character classes Prime Minister Bodyguards Police Terrorists Psychopaths All classes in the same team spawn in the same "base". Within each team the different classes have different weapons, and some classes have special "abilities" that will help their teammates. You can chat privately with your teammates by pressing Maps There are many maps in the PTPM mode, each with different locations and features, requiring tactics to be varied depending on which map is being played. Some are very close quarters and play out like a traditional TDM mode, while others are larger open worlds with more options for strategies. Within the map you are blocked from going too far away by the map boundaries, shown as red lines on the F11 map or on the radar Objectives Some maps also have a series of objectives for the PM to complete, marked on the map by red blips. In these maps, rather than simply staying alive the PM must complete all the objectives within the round time or he will lose. The current objective will be shown on the radar as a red blip and announced on the screen. Unlike tasks, no information about the time needed to complete the objective will be shown to the Terrorists so they must act fast to stop the PM. once an objective is completed, an additional3 minutes will be added to the round timer and the next objective will activate. Pickups Most maps will have weapon and armour pickups hidden around the world. These are often different to the weapons that you spawn with, and allow you to gain an advantage that you would not otherwise have. Some weapons are good for specific purposes and will help to counter well coordinated enemies. For example, Grenades are good against large groups of players, especially inside interior buildings. Sniper riflesare good against a PM that is well defended in a hideout, that cannot be assaulted easily in the normal way. ome maps contain Heavy Weapon pickups (minigun, rocket launcher) as well as regular weapons. These are usually heavily limited by long respawn timers and well hidden. They will offer a significant advantage to anyone that can find them. Safe Zones Some maps have Safe Zones represented by blue blips on the map and blue markers in the world. Dangerous vehicles cannot enter the safe zone (e.g. Hydras, Tanks), so they can be used to keep away from their powerful weapons. However, safe zones are hard to defend on the ground and will act as a focus point for Terrorist attacks. Teams Prime minister - The Prime Minister is the primary class in PTPM. He is the VIP that all the other Good Guys (Bodyguards and Police) must protect, and the Bad Guys (Terrorists) must kill. He has very little firepower and relies on the protection of his loyal team. To play the Prime Minister well you will need a strong knowledge of the map, knowing good hideout locations and how best to escape and avoid Terrorist attacks. You will need to be a good communicator, and you should instruct your team in where you will be going, what you will be doing and how they can best protect you. Body Guards - his is the primary protection force for the Prime Minister. Bodyguards should stick close to the Prime Minister wherever he goes, riding in the same car if possible, and be willing to put themselves in danger to protect the Prime Minister's life. They are not well suited for hunting down Terrorists, and will often have a less substantial weapon loadout. Police - This is the primary attack force for the Prime Minister. The Police are more heavily armed than the Bodyguards and should assault Terrorists as they come close, chasing them down and ensuring they do not make it through to the Prime Minister. If the Prime Minister has laid out instructions for the round, such as defending a particular hideout, the Police are the ones that should act on those instructions. Terrorist - The Terrorists have only a single goal: kill the Prime Minister before the time runs out. They should work closely with the other terrorists to co-ordinate their attacks to achieve maximum impact. If the Prime Minister is defending a location on the map, Terrorists should think carefully about how best to assault. Often, hideouts used by the PM will have back entrances or weak spots that can be exploited if the Good Guys are distracted. If they are defending well, Terrorists should group together and assault as a team to ensure they can break through the defensive lines. Phychopath - Psychopaths have no team and no loyalty. They will attack anyone. Beware Clases Each team within PTPM has multiple classes (characters) that you can choose from. Each class will usually have a unique weapon loadout and a unique skin, while some will additionally have unique abilities. Medics - Most maps have a single Medic class per team, with special abilities allowing them to heal other players, and regenerate their own health. Usually they will spawn with less weaponry than standard classes, so they will need extra protection from their team. Medics have a slightly paler colour so you can identify them on the radar and in the chat.To heal another player walk up to them and type /heal This will transfer some health from the medic onto the target player. Medics will automatically passively heal nearby teammates that are hurt at a rate of 1hp/second. While inside an Ambulance, the passive healing rate is increased to 2hp/second for anybody else inside or very close by. When a medic has lost some health, they will slowly regenerate at a rate of 2hp/second. By coordinating with another medic and healing each other, medics can regenerate all their health very quickly. Maps There are many maps in the PTPM mode, each with different locations and features, requiring tactics to be varied depending on which map is being played. Each map is designed to have a unique feature, distinct from all the others. Current Map List Los Santos Los Santos with Hydras San Fierro Las Venturas Las Venturas with Objectives Area 51 Countryside Desert Factory Mt. Chiliad Bayside Air Assault Join the server IP- 139.99.101.38:22005 Teasmepak 3 - 139.99.101.38 We Are eUNLOCK TEAM
  13. Esta Dando Esse Erro 'end' expected (to close 'function' at line 5) near '<eof>' Server-Side function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end function darDinheiro (source) if commandDelay[source] == nil and not istimer(commandDelay[source]) then local Dinheiro = getPlayerMoney(source) if Dinheiro >= 1200 then return dxMsg(source, "Você possui dinheiro de mais para receber o auxílio.", "error") end givePlayerMoney(source, 1200) dxMsg(source, "Você recebeu o auxílio.", "success") resetCommand(source, 1000) else dxMsg(source, "Você ja recebeu o auxílio.", "warning") end addCommandHandler('auxilio', darDinheiro)
  14. I would like to know about two things: 1. Are the server-side and client-side timers dangerous and why? 2. Is it possible to do the function GetTickCount () timer?
  15. Hello. I am new to creating servers but I just wanted to host a server with my friends, but I don't know what the IP of my server is. When I open console, it just says my server IP is "auto". How do I get the IP of my server?
  16. moh2006

    help in code

    plz help in car trunk code client GUIEditor = { button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(1105, 265, 251, 282, "car remote", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateButton(23, 35, 88, 45, "unlock", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(144, 35, 88, 45, "lock", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(144, 127, 88, 45, "trunk", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(23, 127, 88, 45, "start", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(83, 211, 88, 45, "close", false, GUIEditor.window[1]) end ) local Key = "F7" bindKey(Key,"down", function() guiSetVisible(GUIEditor.window[1],not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end) addEventHandler("onClientGUIClick",root,function() if (source == GUIEditor.button[5]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end) addEventHandler("onClientGUIClick",root,function() if (source == GUIEditor.button[5]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end) addEventHandler("onClientGUIClick", getRootElement() , function (state) if state == "left" then if source == GUIEditor.button[2] then local spieler = getLocalPlayer() triggerServerEvent("doLockVehicle", spieler, spieler) end end end ) addEventHandler("onClientGUIClick", getRootElement() , function (state) if state == "left" then if source == GUIEditor.button[1] then local spieler = getLocalPlayer() triggerServerEvent("doUnlockVehicle", spieler, spieler) end end end ) addEventHandler("onClientGUIClick", getRootElement() , function (state) if state == "left" then if source == GUIEditor.button[4] then local spieler = getLocalPlayer() triggerServerEvent("motoranaus", spieler, spieler) end end end ) addEventHandler("onClientGUIClick", getRootElement() , function (state) if state == "left" then if source == GUIEditor.button[3] then local spieler = getLocalPlayer() triggerServerEvent("trunk", spieler, spieler) end end end ) -- Car Locks ( client ) -- local player localPlayer = getLocalPlayer ( ) -- playSoundNearElement addEvent ( "onPlaySoundNearElement", true ) function playSoundNearElement ( theElement, sound ) -- local sound = 5 local maxdist = 15.0 -- valid element if ( theElement ) then local x,y,z = getElementPosition ( theElement ) local x2,y2,z2 = getElementPosition ( localPlayer ) local dist = getDistanceBetweenPoints3D ( x, y, z, x2, y2, z2 ) -- distance is less than parameter maxdist if ( dist < maxdist ) then -- play parameter sound playSound("siren.mp3") -- outputChatBox ( "sound should play" ) else -- outputChatBox ( "not in range" ) end else -- outputChatBox ( "invalid element" ) end end addEventHandler ( "onPlaySoundNearElement", getRootElement(), playSoundNearElement ) function resourcestart () guiSetVisible(carbild, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), resourcestart) function fenster( ) guiSetVisible ( carbild, not guiGetVisible ( carbild ) ) showCursor ( guiGetVisible ( carbild ) ) end bindKey("z", "down", fenster) --[[ function oeffne_fenster() local IsWindowVisible = guiGetVisible(carbild) if (IsWindowVisible == true) then guiSetVisible(carbild, false) showCursor(false) end if (IsWindowVisible == false) then guiSetVisible(carbild, true) showCursor(true) end end bindKey("z", "down", oeffne_fenster) ]]-- addEventHandler("onClientGUIClick", getRootElement() , function (state) if state == "left" then if source == start_stop_b then local spieler = getLocalPlayer() triggerServerEvent("motoranaus", spieler, spieler) end end end ) server function motoran ( source ) local theVehicle if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then -- off or not set local lights = getVehicleOverrideLights ( theVehicle ) if ( getElementData( theVehicle, "cl_enginestate" ) == false ) then setElementData( theVehicle, "cl_enginestate", true) setVehicleEngineState( theVehicle, true ) else -- on -- set to off setElementData( theVehicle, "cl_enginestate", false ) setVehicleEngineState( theVehicle, false ) end setVehicleOverrideLights ( theVehicle, lights ) else Err_Msg("ليس لديك سيارة", source ) end end addEvent("motoranaus",true) addEventHandler("motoranaus", getRootElement() , motoran) -- ================= -- Car Locks ( server ) -- by moh2006 -- ================= -- player element data -- -- cl_ownedvehicle -- vehicle element data -- -- cl_vehicleowner -- cl_vehiclelocked -- cl_enginestate -- resource starts - ends function initCarLocks () -- Initilize Player Element Data local players = getElementsByType ( "player" ) for k,p in ipairs(players) do removeElementData ( p, "cl_ownedvehicle" ) bindKey ( p, "l", "down", doToggleLocked ) end -- Initilize Vehicle Element Data local vehicles = getElementsByType ( "vehicle" ) for k,v in ipairs(vehicles) do removeElementData ( v, "cl_vehicleowner" ) removeElementData ( v, "cl_vehiclelocked" ) removeElementData ( v, "cl_enginestate" ) setVehicleLocked ( v, false ) setVehicleOverrideLights ( v, 0 ) end end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), initCarLocks ) addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource () ), initCarLocks ) -- player joins function cl_PlayerJoin ( ) bindKey ( source, ";", "down", doToggleLocked ) end addEventHandler ( "onPlayerJoin", getRootElement(), cl_PlayerJoin ) -- player quits function cl_PlayerQuit ( ) -- check for owned car local ownedVehicle = getElementData ( source, "cl_ownedvehicle" ) if (ownedVehicle ~= false) then cl_RemoveVehicleOwner ( ownedVehicle ) end end addEventHandler ( "onPlayerQuit", getRootElement(), cl_PlayerQuit ) -- player dies function cl_PlayerWasted ( ) -- check for owned car local ownedVehicle = getElementData ( source, "cl_ownedvehicle" ) if (ownedVehicle ~= false) then cl_RemoveVehicleOwner ( ownedVehicle ) end end addEventHandler ( "onPlayerWasted", getRootElement(), cl_PlayerWasted ) -- player tries to enter vehicle function cl_VehicleStartEnter ( enteringPlayer, seat, jacked ) local theVehicle = source local theOwner -- locked and not owner entering if ( getElementData ( theVehicle, "cl_vehiclelocked" ) == true ) then theOwner = getElementData ( theVehicle, "cl_vehicleowner" ) if theOwner ~= false and theOwner ~= enteringPlayer then -- make sure they dont enter --cancelEvent(); end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), cl_VehicleStartEnter ) -- player enters a vehicle function cl_PlayerDriveVehicle ( player, seat, jacked ) -- Driver Enter if ( seat == 0 ) then oldVehicle = getElementData ( player, "cl_ownedvehicle" ) -- not entering player's own owned vehicle if ( (cl_VehicleLocked(source) == true) and (cl_VehicleOwner(source) ~= player) ) then removePlayerFromVehicle( player ) Err_Msg("Este veículo está trancado.", player) return false end -- set element data for vehicle and owner cl_SetVehicleOwner ( source, player ) end return true end addEventHandler ( "onVehicleEnter", getRootElement(), cl_PlayerDriveVehicle ) -- vehicle respawns function cl_VehicleRespawn ( exploded ) cl_RemoveVehicleOwner ( source ) end addEventHandler ( "OnVehicleRespawn", getRootElement(), cl_VehicleRespawn ) -- vehicle explosion function cl_VehicleExplode ( ) local theOwner = getElementData ( source, "cl_vehicleowner" ) if ( theOwner ~= false ) then cl_RemoveVehicleOwner ( source ) end end addEventHandler ( "onVehicleExplode", getRootElement(), cl_VehicleExplode ) -- set vehicle owner function cl_SetVehicleOwner ( theVehicle, thePlayer ) local oldVehicle = getElementData ( thePlayer, "cl_ownedvehicle" ) if ( oldVehicle ~= false ) then -- unlock old car removeElementData ( oldVehicle, "cl_vehicleowner" ) removeElementData ( oldVehicle, "cl_vehiclelocked" ) removeElementData ( oldVehicle, "cl_enginestate" ) setVehicleLocked ( oldVehicle, false ) -- set vars for new car end setElementData ( theVehicle, "cl_vehicleowner", thePlayer ) setElementData ( theVehicle, "cl_vehiclelocked", false ) setElementData ( thePlayer, "cl_ownedvehicle", theVehicle ) setElementData( theVehicle, "cl_enginestate", true ) end function cl_RemoveVehicleOwner ( theVehicle ) local theOwner = getElementData ( theVehicle, "cl_vehicleowner" ) if ( theOwner ~= false ) then removeElementData ( theOwner, "cl_ownedvehicle" ) removeElementData ( theVehicle, "cl_vehicleowner" ) removeElementData ( theVehicle, "cl_vehiclelocked" ) removeElementData ( owned, "cl_enginestate" ) end setVehicleLocked ( theVehicle, false ) end -- flash the lights twice function cl_FlashLights ( thePlayer ) setTimer ( doToggleLights, 300, 4, thePlayer, true ) end -- flash once function cl_FlashOnce ( thePlayer ) setTimer ( doToggleLights, 300, 2, thePlayer, true ) end -- get vehicle owner ( according to vehicle's element data ) function cl_VehicleOwner ( theVehicle ) return getElementData( theVehicle, "cl_vehicleowner" ) end -- is vehicle locked ( according to vehicle's element data ) function cl_VehicleLocked ( theVehicle ) return getElementData( theVehicle, "cl_vehiclelocked" ) end -- messaging functions -- send red error message function Err_Msg ( strout, thePlayer ) outputChatBox ( strout, thePlayer, 200, 0, 10 ) end -- send message to all occupants of vehicle function Car_Msg ( strout, theVehicle ) numseats = getVehicleMaxPassengers ( theVehicle ) for s = 0, numseats do local targetPlayer = getVehicleOccupant ( theVehicle, s ) if targetPlayer ~= false then outputChatBox ( strout, targetPlayer, 30, 144, 255 ) end end end -- send aquamarine message to player function Info_Msg ( strout, thePlayer ) outputChatBox ( strout, thePlayer, 102, 205, 170 ) end -- commands function doToggleLockeds ( source ) local theVehicle , strout if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then local vehiclename = getVehicleName ( theVehicle ) -- already locked if ( getElementData ( theVehicle, "cl_vehiclelocked") == true ) then doUnlockVehicle ( source ) else doLockVehicle ( source ) end else Err_Msg("ليس لديك سيارة", source) end end addEvent("doUnlockVehicle",true) addEventHandler("doUnlockVehicle", getRootElement() , doToggleLockeds) function doToggleLocked ( source ) local theVehicle , strout if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then local vehiclename = getVehicleName ( theVehicle ) -- already locked if ( getElementData ( theVehicle, "cl_vehiclelocked") == true ) then strout = "Your " .. vehiclename .. " is already locked." Err_Msg(strout, source) else setElementData ( theVehicle, "cl_vehiclelocked", true) setVehicleLocked ( theVehicle, true ) Car_Msg( "Arac " .. vehiclename .. " قفل السيارة.", theVehicle) Info_Msg ( "تم فك قفل السيارة", source ) if ( getVehicleController ( theVehicle ) == false ) then cl_FlashLights ( source ) end end else Err_Msg("ليس لديك سيارة", source) end end addEvent("doLockVehicle",true) addEventHandler("doLockVehicle", getRootElement() , doToggleLocked) function doUnlockVehicle ( source ) local theVehicle, strout if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then local vehiclename = getVehicleName ( theVehicle ) if ( getElementData ( theVehicle, "cl_vehiclelocked") == false ) then strout = "السيارات " .. vehiclename .. " مقفلة بالفعل." Err_Msg(strout, source) else setElementData ( theVehicle, "cl_vehiclelocked", false) setVehicleLocked ( theVehicle, false ) Car_Msg( "السيارة " .. vehiclename .. " فتحت.", theVehicle ) Info_Msg ( "فتح القفل.", source ) if ( getVehicleController ( theVehicle ) == false ) then cl_FlashOnce ( source ) end end else Err_Msg("ليس لديك سيارة", source) end end function doToggleLights ( source, beep ) local theVehicle if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then -- if he was in one if ( getVehicleOverrideLights ( theVehicle ) ~= 2 ) then -- if the current state isn't 'force on' setVehicleOverrideLights ( theVehicle, 2 ) -- force the lights on -- play sound close to element if ( beep == true ) then local theElement = theVehicle triggerClientEvent ( getRootElement(), "onPlaySoundNearElement", getRootElement(), theElement, 5) end else setVehicleOverrideLights ( theVehicle, 1 ) -- otherwise, force the lights off end else Err_Msg("ليس لديك سيارة", source ) end end addEvent("doToggleLight",true) addEventHandler("doToggleLight", getRootElement() , doToggleLights) addCommandHandler ( "engine", motoran ) addCommandHandler ( "lights", doToggleLight, false) addCommandHandler ( "lock", doLockVehicle ) addCommandHandler ( "unlock", doUnlockVehicle ) addCommandHandler ("trunk", trunk) if you help thanks for help....
  17. I have one question about client objects, if I use the "TriggerClientEvent" function on the server side script, whether the object that was saved on the client side and will be set with the triggerClientEvent function on the server side, will every player see it and will work in the same way as normally I would call it in the server side script "createObject (object, x, y, z)"? For example, such -- client addEvent("createObject", true) addEventHandler("createObject", root, function(object, x, y, z) createObject(x, y, z) end ) -- server triggerClientEvent(root, "createObject", root, 1372, 0, 0, 5) -- Would that be the same as this? -- server createObject(1372, 0, 0, 5)
  18. Öncelikle Selamlar , Adım Muhammet ve MTA'da arkadaşlarımızla custom bir server üzerinde çalışıyoruz. Serverdaki araçlar ve scriptler ile ben ilgileniyorum. Server'a sultan,elegy,uranus gibi bir arabaları modelledim ama sticker kurmakta sıkıntı çekiyorum. Nasıl yapılacağını bilen varsa yardım edebilir mi?
  19. Hello i need help with this gamemode i dont know how i can fix this error, thank for ur attention, sorry for my english. [Pterodactyl Daemon] Server marked as STARTING [Pterodactyl Daemon] Checking size of server data directory... [Pterodactyl Daemon] Disk Usage: 321M / 31000M [Pterodactyl Daemon] Ensuring correct ownership of files. [Pterodactyl Daemon] Running server preflight. [Pterodactyl Daemon] Starting server container. steam user is not set. Using anonymous user. No appid set. Starting Server :/home/container$ ./mta-server64 --port ${SERVER_PORT} --httpport ${SERVER_WEBPORT} -n /entrypoint.sh: line 46: ./mta-server64: Permission denied [Pterodactyl Daemon] Server marked as OFF [Pterodactyl Daemon] ---------- Detected server process in a crashed state! ---------- [Pterodactyl Daemon] Exit Code: 126 [Pterodactyl Daemon] Out of Memory: false [Pterodactyl Daemon] Error Response: [Pterodactyl Daemon] Aborting automatic reboot due to crash within the last 60 seconds.
  20. Greetings, Introducing FREE hosting solutions! All you have to do is post for host. Get going to the forum and start posting for your server. The forum Link : Visit www.vortexhost.me Or Click here Get your server NOW! Gamepanel and more! Free WebHosting : www.vortexweb.ga
  21. Hi all ! I also have a problem with debugscript 3 on the server and it's hosted! why does this error occur to me continuously? please help me I'm a Beginner-Medium! ERROR: Server triggered clientside event syncFuel, but event is not added clientside ! Thank you in advance ! https://imgur.com/GBtIL9j
  22. We are developing team making racing server we need cars designers and members for testing beta server if you are interest dm me on Discord : YYH55#8888
  23. function StandardWep() local x, y, z = getElementPosition(getLocalPlayer()) wep = createWeapon("m4", x+5, y, z) setWeaponFlags(wep, "shoot_if_blocked", false) setWeaponFiringRate(wep, 35) setWeaponProperty(wep, "damage", 25) setWeaponClipAmmo(wep, 35) setWeaponAmmo(wep, 100) end addCommandHandler("OnStandardWep", function(command, state) local s = string.upper(state) if s=="ON" then setWeaponState(wepM16, "firing") elseif s=="false" then setWeaponState(wepM16, "ready") else outputChatBox("There is no such condition of the weapon, you can only use 'ON / OFF'", 255, 50, 0) end end ) The point is that it does not hurt other players, what's more, other players do not even see the line of fire (I mean the yellow line which means how fast the bullets are moving and in which direction) and the weapon itself (M4), I know that you need to use triggerClientEvent but no I know how to apply it, please help me with an example ; -;
  24. Hola a todos, nos complace informarles y darles a conocer nuestro gran servidor: Speed Force Racing [SFR] mtasa://88.214.59.30:2213 Somos el mejor y mas completo servidor dedicado a la modalidad de juego Race DM, Shooter y DD. Contamos con diferentes sistemas que hacen de tu estancia dentro del juego totalmente satisfactoria. Puedes pasar largas horas de diversión y entretenimiento dentro de nuestro servidor en compañia de todos tus amigos y otros jugadores. Contamos con: - Sistema VIP - Panel de usuario con: Opciones de juego, Skins, Tienda de mapas, Reproductor y otras sorpresas. - Sistema de niveles basado en experiencia y adaptado totalmente para vivir una experiencia de juego agradable. - Sistema de logros para reconocer tus habilidades dentro de esta modalidad de juego. - Sistema de recompensas diarias. - Servidor estable, 24/7 y con buen ping para los jugadores. - Gran variedad de mapas de toda la modalidad Race para hacer tu experiencia mas dinámica. - Excelente ambiente y convivencia dentro de nuestra comunidad y servidor. - ¿Hablas poco español? No te preocupes, también contamos con un sistema de lenguajes. - Muchas cosas mas que puedes descubrir con tan solo ingresar a nuestro servidor. ¿Qué estas esperando?... Bienvenido, te estamos esperando con gusto. Speed Force Racing [SFR]: mtasa://88.214.59.30:22133 Puedes buscarnos y conocernos en nuestras paginas oficiales: Facebook: https://www.facebook.com/Speed-Force-Racing-MTA-SA-102925024747622 Comunidad: https://www.gtachile.com/foro/1452-speed-force-racing-mtasa/
  25. windows sistema 32bits. Buenas, tengo un problema cuando quiero entrar al servidor entra carga y en determinado punto se me cierra el MTA y me sale este recuadro no se como poner la imagen
×
×
  • Create New...