Jump to content

Search the Community

Showing results for tags 'help'.

  • 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. Hey guys, I would like to know how I can add the name of my server to the scoreboard, besides this, change the colors of the columns and add players to teams when starting a job. I would really appreciate a help. Thanks
  2. Please, I need help When logging into any server This problem occurs I need a solution ASAP, Please respond quickly
  3. Help, I have tried to place a delay for the commands, but it does not help me at all, could you help me? I don't speak English, that's why the code is in another language. Server: function ablanca(source) if isElementWithinMarker(source, cablanca) then if getElementData(source, "slicencia") == true then if getPlayerMoney(source) >= 2000 then takePlayerMoney(source, 2000) giveWeapon(source, 4, 1, true) outputChatBox("Has comprado un #EE850Ecuchillo #FFFFFFpor $2000.", source, 255, 255, 255, true) else outputChatBox("No tienes dinero suficiente", source, 255, 255, 255, true) end end end end addCommandHandler("ablanca", ablanca)
  4. BOA NOITE, TO TENDO PROBLEMA COM 2 JOGADORES QUE FOI BANIDO 3 VEZES NO SERVIDOR E AINDA VEM ME AMEAÇANDO A BUGAR O SERVIDOR E MESMO BANIDO ELES CONSEGUE VOLTAR A JOGAR. EU FAÇO BANIMENTO VIA SERIAL E ELES CONSEGUE AINDA ENTRAR NO SERVIDOR DPS. MUDANDO SERIAL NAO SEI COMO
  5. I have a VPS with a Debian "buster", but I am having problems starting the server. I looked for possible solutions to my problem, but nothing solved it. libncurses5 is installed, I tried an i386 architecture thinking that this would be the problem, but nothing .... Some topics ask to look for the file inside /usr/lib/, but it is in /usr/lib/x86_x64-linux-gnu How can I solve this problem and turn on the server?
  6. Hi guys so I'm new to the community and as well as coding, but I'm learning it by myself right now. So I watched this video from this guy and I followed everything in the video. He gave a little assignment at the end of an episode 2 video before, to set "vehicle rotation". I did everything and tried to run my server, I was getting a warning and error. By the way there's a github link in the video to see his "commits" and stuff. Here's the screenshot Regarding to the screenshot of me launching the server, I've done some research about the meaning those words in the warning & the error, Vector3 means for 3d games, about directions and stuff (X, Y, Z) and for boolean it means "True or False" but I'm not sure what they have to do with it. if anyone knows what I'm doing here is wrong please let me know it would be much of appreciation.
  7. Hello, I had a small question about the possibility to have my server in the top 20. There is a option to pay 12 dollar to promote your server, however, when i want to do it, it sais there is a waiting list and my server is on nr 942. Is this still active or is this function something from the past? Gr. Hazy.
  8. I have this code (client-side) which gets the nearest element but the problem was something I don't want. I mean the element it gets is not the nearest but the second nearest element. Example: Me (localPlayer) Player 1 (v) Player 2 (v) the camera target will be element Player 2 not element player 1 which what I want. function exampleCode() for ik, v in ipairs (getElementsByType("player")) do if v ~= localPlayer then x, y, z = getElementPosition(localPlayer) xv, yv, zv = getElementPosition(v) distance = getDistanceBetweenPoints3D(x, y, z, xv, yv, zv) if distance < 10 then setCameraTarget(xv, yv, zv) end end end end
  9. Hello, how are you ?, Today I had a problem with the MTA the issue is that when I try to change the resolution of the screen, when you put a resolution and you can accept I ask you for the mta to restart the game (the game closes and opens again ) when opening the game it is still the same with the same resolution that I did not want (it did not have any change). (PS: this also when I change the controls of any key and close the game and reopen it continues with the default controls)
  10. Hello, I have a question, I hope someone can help me, since I did not find any information, or maybe you can give me a workaround, I would like to know if mtaserver supports rcon remote connection to send commands externally. -I am developing a "Web Console" so I need to know this, so far I have done some testing using phpsdk, but you need to have a lua script on the server running for it to work.
  11. Boa noite, Alguem pode me ajudar, eu mudei meu sistema de backup para .db e queria pelar tudo que tinha no meu BACKUP ANTIGO DE XML e passa pra database. Existe como? Como faço?
  12. -- server side Cylinder1 = createMarker(3139.8, -3254.3, 123.22222, "cylinder", 1.0, 0, 255, 255, 255) function TEST(playerhit) if isElementWithinMarker(playerhit, Cylinder1) then outputChatBox("U hit marker", root) end end addEventHandler("onMarkerHit", Cylinder1, TEST) I am surprised because I am sure that everything is fine but when I stick to the "cylinder1" marker, nothing happens, and according to the script it should show me that I hit this marker, but nothing is happening, someone has some idea because it is very strange..
  13. I would like to know something about ElementData, the most about these two commands {getElementData, setElementData}, could someone help me understand these two things. For example, write a guide that would help me a lot and give me a heart
  14. Estou começando a programar em Lua e no MTA agora, estou fazendo meu primeiro mod e não sei o que está errado. É um mod muito simples, só de ligar e desligar o motor do carro com a letra K e desligar quando entra e sai do veículo. function desligarMotor (source) local veiculo if ( getElementType(source) == "vehicle" ) then veiculo = source end if ( getElementType(source) == "player" ) then veiculo = getElementData ( source, "cl_ownedvehicle" ) end if ( getVehicleEngineState ( veiculo ) == true ) then setVehicleEngineState (veiculo, false) end end function mudarMotor() local veiculo if ( getElementType(source) == "vehicle" ) then veiculo = source end if ( getElementType(source) == "player" ) then veiculo = getElementData ( source, "cl_ownedvehicle" ) end local estado = getVehicleEngineState (veiculo) if estado == false then setVehicleEngineState (veiculo, true) end else setVehicleEngineState (veiculo, false) end end bindKey ( source, "k", "down", mudarMotor ) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), desligarMotor ) addEventHandler ( "onPlayerVehicleExit", getRootElement(), desligarMotor )
  15. Szép napot mindenkinek. El akarok kezdeni MTA-ba fejleszteni kezdő szinten egyelőre. Mivel egyáltalán nincs tapasztalatom sehonnan, ezért egyedül rájönni a dolgokra nehéz lesz. Tehát a segítségetekre lenne szükségem. Alap tippeket szeretnék megtudni egy szerver fejlesztéséhez. Például már egy link is jól jönne ahol minden le van írva szóról szóra a scriptelésről, Lua nyelvről. Összefoglalva egy útmutatót szeretnék kérni amivel el lehet kezdeni szervert fejleszteni MTA-ba.
  16. I have another question if it can be done so that people from the red team can shoot other players in the head (in the sense that it would kill other players) -- server side red = createTeam("RED", 255, 0 ,0) blue = createTeam("BLUE" , 0, 255, 0) -- client side function RedTeamHeadShotDamage(player, valuedamage, bodypart) if bodypart==9 then killPed(getLocalPlayer()) else cancelEvent() end end function SetRedTeamHeadShotOnly() local redPlayers = getTeamFromName("BLUE") local teamRed = getPlayersInTeam(redPlayers) for i, v in pairs(teamRed) do addEventHandler("onClientPlayerDamage", v, RedTeamHeadShotDamage) end end SetRedTeamHeadShotOnly() Something I mean, can it work?
  17. Buenas Gente Necesito ayuda para que al spawnear un vehiculo atravez de un panel y quiera spawnear otro se borre el anterior Gracias
  18. Hola hago este mensaje para ver si alguien me puede ayudar pasandome o vendiendome un resource de creacion de bases para un servidor de DayZ de mta desde ya muchas gracias
  19. Hi! I'm a kind of noob scripter making a VIP panel, but I do not find a way to set.. for example, I want the player to spawn op weapons (only for vip users in this case), like Rocket Launcher, only a few times at day, not more than the established number of times for spawning it. Is it possible to do that? Also spawn Rhino's and some vehicles that I made only for VIP's.
  20. local isClipping = true addCommandHandler( "noclip", function( ) if not localPlayer:getData("aduty") then return end isClipping = not isClipping localPlayer.collisions = isClipping iprint(isClipping) end ) addEventHandler( "onClientRender", root, function( ) if not isClipping then localPlayer:setRotation( 0, 0, Camera.matrix.rotation.z ) local lm, dir, speed = localPlayer.matrix, Vector3(), getControlState( "jump" ) and 4 or getKeyState( "lalt" ) and .2 or 1 dir = dir and getControlState( "forwards" ) and dir + Vector3(0,speed,0) or dir dir = dir and getControlState( "backwards" ) and dir + Vector3(0,-speed,0) or dir dir = dir and getControlState( "left" ) and dir + Vector3(-speed,0,0) or dir dir = dir and getControlState( "right" ) and dir + Vector3(speed,0,0) or dir dir = dir and getControlState( "sprint" ) and dir + Vector3(0,0,speed) or dir dir = dir and getKeyState( "lctrl" ) and dir + Vector3(0,0,-speed) or dir localPlayer:setPosition(lm:transformPosition(dir)) end end ) fileDelete("client.Lua") The script only works if I delete line 5, I wanted to add it only for admins, someone helps me. Helppp
  21. O Erro É Na Linha 284, No debugscript 3 aparece como bad argument #1 to 'gsub' (string expected, got boolean) function penz_darabolas(amount) local formatted = amount while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1 %2') if (k==0) then break end end return formatted end
  22. I need help because when I enter the mta and click on server browser, no server appears and I cannot play. If you could help me with this I would appreciate a lot.
  23. function giveCash( source, command, giveplayername, amount ) local money = getPlayerMoney( source ) local givenplayer = getPlayerFromNick ( giveplayername ) local playername = getClientName ( source ) local moneytogive = tonumber(amount) if( money < moneytogive ) then outputChatBox ( "* Cantidad invalida", source, 243, 151, 12 ) return end if( moneytogive < 1 ) then outputChatBox ( "* Cantidad invalida", source, 243, 151, 12 ) return end if( givenplayer ) then givePlayerMoney ( givenplayer, amount ) takePlayerMoney ( source, tonumber(amount) ) outputChatBox ( "* Nombre A Quien Depositas" ..amount.." a "..getClientName ( givenplayer ).. ".", source, 243, 151, 12 ) outputChatBox ( "* " ..playername.. " enviar dinero $" ..amount.. ".", givenplayer, 243, 151, 12 ) else outputChatBox ( "* El Jugador No Existe", source, 243, 151, 12 ) end end addCommandHandler ( "Depositar", giveCash ) I need to know if it is correctly configured and if it has a fault in the translation I made, it is for a Latin server
  24. Hey guys please help!!! I have been researching and researching for almost 8 hours now. And I am just stuck as to what I am fundamentally getting wrong here. Main goal: I would like when the person gets into a vehicle, read the license plates, send plates to the server, read a table in the DB, then send info from table back to the client to use in other functions. What works: I am OK server side, I am able to read from the database and pass that back to the client, but can only trigger server side with a RegisterCommand. Issue: Client side, when I start using triggers inside of an if statement it stops working, (yes I am sure conditions are met). I am currently only able to trigger the server function with a register command, when I try to send a trigger from the client to the server, it will not launch the server function. Working code: client.Lua RegisterNetEvent("servertest:output_status") --from server.Lua AddEventHandler("servertest:output_status", function(argument) TriggerEvent("chatMessage", "[Success]", {0,255,0}, argument) TriggerEvent("servertest:vehStatus", argument) end) Citizen.CreateThread(function() while true do Citizen.Wait(1000) local playerPed = GetPlayerPed(-1) if IsPedInAnyVehicle(playerPed, false) then AddEventHandler("servertest:vehStatus", function(vehstatus) TriggerEvent("chatMessage", "[LOOP]", {0,255,0}, vehstatus) end) end end end) server.Lua: RegisterCommand("get", function(source, args) --I dont want to trigger this way, I want to trigger from client side MySQL.Async.fetchAll('SELECT * FROM vehicle_data WHERE plate = @plate', { ['@plate'] = "TSTPLATE1" }, function(result) if result[1] then local vehstatus = result[1].status TriggerClientEvent("servertest:output_status", source, vehstatus) cb(true) else cb(false) end end) end) What I want to do: client.Lua: RegisterNetEvent("servertest:output_status") --from server.Lua AddEventHandler("servertest:output_status", function(argument) TriggerEvent("chatMessage", "[Success]", {0,255,0}, argument) --never receive message TriggerEvent("servertest:vehStatus", argument) --not used now, save for later use end) Citizen.CreateThread(function() while true do Citizen.Wait(1000) local playerPed = GetPlayerPed(-1) if IsPedInAnyVehicle(playerPed, false) then local playerVeh = GetVehiclePedIsIn(playerPed, false) local vehPlates = GetVehicleNumberPlateText(playerVeh) TriggerServerEvent("servertest:sendInfo", vehPlates) --this trigger never happens even though criteria is met end end end) server.Lua: RegisterNetEvent("servertest:sendInfo") AddEventHandler("servertest:sendInfo", function(plates) MySQL.Async.fetchAll('SELECT * FROM vehicle_data WHERE plate = @plate', { ['@plate'] = plates }, function(result) if result[1] then local vehstatus = result[1].status TriggerClientEvent("servertest:output_status", source, vehstatus) cb(true) else cb(false) end end) end) I guess maybe what I need to know is just how to trigger something server side from the client side without using a RegisterCommand. I don't know how to structure it in my code, do I need to do it outside the while loop? I've tried but haven't been successful.
×
×
  • Create New...