Search the Community

Showing results for tags 'lua'.



More search options

  • 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
    • Open Source Contributors
    • Suggestions
  • General MTA
    • News
    • Media
    • Site/Forum/IRC/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • community.mtasa.com
    • 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
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Gang


Location


Occupation


Interests

Found 247 results

  1. I want get online player count from my secondary server, and show with a label.. But how is it possible?
  2. I wanna get remaining time from the video, but does not working.. Why? function callback(data, error) if (error ~= 0) then return outputChatBox(error) end if (data == "ERROR") then return outputChatBox("data error") end local data = fromJSON("["..data.."]") if (data) then local minutes, seconds = convertTime(tonumber(data.length)) if seconds < 10 then seconds = "0"..seconds end outputChatBox("Title: "..data.title) outputChatBox("Length: "..minutes..":"..seconds ) outputChatBox("Remaining: "..data.remaining) loadBrowserURL( browser, data.link ) end end
  3. Hello friends ! Aren't there any easy way to get the offset position of X, Y and Z of an attaching element, that can be used as "attachElements" function's arguments ? Please tell me a way if you know.
  4. Client: function winnerMessenger ( text, playerName) win.text = text win.name = playerName removeEventHandler("onClientRender",root,winMsg) addEventHandler("onClientRender",root,winMsg) triggerServerEvent("plusz1", localPlayer, getLocalPlayer) end addEvent("winnerMessage",true) addEventHandler("winnerMessage",getRootElement(),winnerMessenger) Server: function asdasd() if getPlayerRank( source ) ~= 1 then return end local gyozelmek = getElementData(source,"Győzelmek") or 0 setElementData(source, "Győzelmek", gyozelmek + 1 ) givePlayerMoney(source,2) outputChatBox("#FFffFFAmiért megnyerted a kört, kaptál #00FFFF'2' coint!",source,r,g,b,true) end addEvent("plusz1", true) addEventHandler("plusz1", root, asdasd) And when the win msg appear, the setelementdata add 1 win point, and money for everybody.. How to fix this? I want add win point and money only to the winner, not everybody...
  5. eSPeZet

    Compiled .luac or .lua?

    Hello, I was wondering if a compiled script would affect the performance/FPS of players. I think the script would have to get "compiled" ANYWAY even when i do NOT compile it myself. So the answer could be that a compiled script makes it load even FASTER since it has to compile it anyway (CORRECT ME IF IM WRONG). So my question is if I am right with this or not.. And also: Does the "Extra obfuscation" reduce FPS? To me it seems logical that it COULD lead to some FPS loss, since it has to get decrypted all the time.
  6. I want play songs from youtube, but i don't know how to use a converter to this.. Anyone can send me a WORKING link like this: http://www.convertmp3.io/fetch/?video=..ytlink..? Sorry for my bad english...
  7. Arctic

    LUA to MAP conversion?

    So i've been messing around with the map editor and i have a few projects. My problem lies in that i have a map converted into LUA and of course, i can load it and see it, but i can't edit it anymore because its lua. Is there a converter out there that does LUA back to MAP? I searched all i could but with no outcome. Either the angels in the map file i get converted are totally messed up or theres no converter able to do it.
  8. Callum

    FREE Scripting Lessons!

    I have launched a new, entirely free service that offers personal tutoring to anybody who wants to learn new MTA skills, including: Setting up an MTA Server Resources / scripts / meta.xml Writing Lua code MTA concepts such as events, timers, client-side interfaces, etc. SQL and other data storage methods I've been in the MTA community for coming up to 11 years now, and have worked with many of the 'big servers' that exist today, so the information will be delivered by people (including myself) with plenty of experience. The few students I'm already tutoring are well on their way to writing some basic MTA scripts already, after only a few days (totaling 4-5 hours). If you want to get involved, be sure to join the Discord server. You can also click here to see the recommended syllabus. If you know of anybody else who wants to learn to script, be sure to let them know of this great offer!
  9. Where can i download a good inventory script for rp server?
  10. Pessoal a Pouco Tempo Comecei a Trabalhar Com Linguagem. Lua e Para Conseguir Cria Meu Servidor e Ser Independente De Precisar Pegar Um Painel Entrar Ou Um Script Em SItes Apr Aprendi Bastante Coisa Mais Pulei a Peça Do Painel Login e Queria Saber Se Voces Pode Explicar Como Consigo Criar Short Time Staff I Started Working With Language. Moon and To Be able to Create My Server And Be Independent Of Need To Pick A Login Panel Or A Script In SItes I Learned A Lot More Thing I Have Skipped The Part Of The Login Panel And I Wanted To Know If You Can Explain How I Can Create Краткосрочный персонал Я начал работать с языком. Луна и иметь возможность создавать свой сервер и быть независимыми от необходимости выбирать панель входа или сценарий В SItes я узнал, что многое другое, что я пропустил часть панели входа в систему, и я хотел узнать, можете ли вы объяснить, как я могу создать
  11. s2sk

    Lua f*k sh*t

    I MAKE SO setElementData(source, "countCheckpoitBusRoad", 0) -- somewhere in the code local countCheckpoint = getElementData(player, "countCheckpoitBusRoad") + 1 -- callback hit marker -- AND HERE ERROR setElementData(player, "countCheckpoitBusRoad", countCheckpoint) AND HAVE "ERROR: attempt to perform arithmetic on a boolean value 'countCheckpoint '" WHY??? MY SYSTEM-BUS WORK, BUT IN CONSOLE MORE ERROR
  12. Hello. (sry for english and stupid question) I created window and input field on DGS win = DGS:dgsDxCreateWindow(0.18, 0.27, 0.22, 0.3," ",true,0xFF000000,25,nil,0xFFFFFFFF,nil,0xFFFFFFFF,5,true) -- window emailBoxReg = DGS:dgsCreateEdit( 0.1, 0.36, 0.8, 0.1, "INPUT FIELD", true, win, 0xFF000000, 0.5, 0.5, nil, 0xFFEBEBEB, false) -- input field DGS:dgsDxGUISetVisible( winReg, true) -- show DGS:dgsDxWindowSetMovable(winReg, false) DGS:dgsDxWindowSetSizable(winReg, false) guiSetInputEnabled(true) -- input showCursor(true) -- cursor why if i click on input field, later click on window - next clicks everywhere not work?
  13. s2sk

    Question from Pawn scripter

    Hi. I have 2 problem. In Pawn (sa-mp hello) i can write stock Function(value1, value2 = 5, value3 = 10) // value2 and value3 optional parameters { return 1; } how make it in Lua (i talking about optional parameters)? if make so function Function(value1, value2 = 5, value3 = 10) { } i have error from interpreter and more question... how skip argument? again in Pawn i can write stock Function(value1, value2 = 5, value = 10) { return 1; } public OnPlayerConnect(playerid) { Function(value1, .value3 = 20); // <<<----------- skip value2 } how make it on Lua? thx.
  14. CleyzChan

    How to start learning?

    Hello dear users of this forum! I'm a beginner in Lua and I don't how to start learning. I know some other languages. As JavaScript, Python, Pawno and etc. Can you help me with it? Which plugin create me for start? Thank you in advance and sorry for my English.
  15. Hello dear users of this forum! The project "American History" need the lua programmers. The form of wage: We will pay from donations. And somtimes will give bonuses. Information about the project: The project will be multi-language. English, Russian and Azerbaijani. It will help for our profit. We make a map of America. On the project will be history of player. It will add atmosphere to the server. All actions on the server will unfold in the 90s. As in the original GTA San Andreas. You can get broad information in: vk.com/cosmolyon & in the messenger of this site. Good bye!
  16. CleyzChan

    Lua Programmer

    Hello dear users of this forum! The project "American History" need the lua programmers. The form of wage: We will pay from donations. And somtimes will give bonuses. Information about the project: The project will be multi-language. English, Russian and Azerbaijani. It will help for our profit. We make a map of America. On the project will be history of player. It will add atmosphere to the server. All actions on the server will unfold in the 90s. As in the original GTA San Andreas. You can get broad information in: vk.com/cosmolyon & in the messenger of this site. Good bye!
  17. n0rt0x

    offedit break command

    Heya all, On our server we have this ingame map editor called offedit, which has quite some options to manipulate objects and stuff. For example "mcol", which toggles objects (only colled objects by default) to remove their collision. So lately i was wondering, is it possible to make a similar script for objects that break by default? So with that, you can remove/suppress the break animation. Would the game engine allow us to do that? I know that the default map editor has such an option, but i don't know if it would work in a scripted form. And nope, i don't have LUA knowledge, but i do like to think about possibilities.. Regards, n0rt0x
  18. Somehow i can make this possible? When a player connect, then he have to wait the end of download, then he can use the fr gui. I want make fr gui usable when player download the mods. Sorry for my bad english..
  19. Hello, I want to pass the Client-player with the function triggerServerEvent (for example to trigger an event and ONLY the client triggered the event so that ONLY HE would receive a message) and this is how i would do it: triggerServerEvent("blabla", localPlayer, bla) But MTA-wiki says the following sentence: Warning: You should use the global variable client serverside instead of passing the localPlayer by parameter or source. Otherwise event faking (passing another player instead of the localPlayer) would be possible. So I assume, that I shouldn't do it the way I just posted above, but I have no clue what they mean by this sentence and how else I should do it then.. Could anyone explain this WITH an example?
  20. Opa galera! Blz? Esses dias estava com dúvidas sobre como criar algum script que fosse de taxi/uber para players. Acabou que achei um que era exatamente como eu queria. Mas esse tem algum problema que não consegui encontrar que não permite funcionar. Se alguém puder dar uma força, vai ajudar MUITO! Server.lua -- by manawydan taxi_system lado = server local PrecoTaxi = "50" local BlipsTaxi = {} addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function() if not TimeTaxi then TimeTaxi = createTeam("Taxistas",20,100,20) end end) function PedirTaxi(thePlayer) if (getElementData(thePlayer,"TaxiClient")) then return end --else if (getPlayerMoney(thePlayer) >= tonumber(PrecoTaxi)) then setElementData(thePlayer,"TaxiClient",true) BlipsTaxi[thePlayer] = createBlipAttachedTo(thePlayer,0,2,0,0,250,210) JogadoresTaxistaTabela(thePlayer) outputChatBox("[Taxi]: Taxi logo chegara, por favor aguarde",thePlayer) end end addCommandHandler("taxi",PedirTaxi) function JogadoresTaxistaTabela(Player) local Jogadores = getElementsByType("player") for _,Jogad in ipairs(Jogadores) do if (getElementData(Jogad,"Taxista")) and (getElementData(Jogad,"TaxistaStat") == vazio) and getPlayerTeam(Jogad) == getTeamFromName("Taxistas") then local NomeTaxiClient = getPlayerName(Player) outputChatBox("Taxi solicitado por: "..NomeTaxiClient,Jogad) end end end function TaxiSystemEntrarNoTaxi(Carro,assento,jacked) if not (getElementModel(Carro) == 420) then return end if not (getElementData(source,"TaxiClient")) then return end if not (assento == 0) then local Taxista = getVehicleController(Carro) if Taxista and getElementData(Taxista,"Taxista") and (getPlayerTeam(Taxista) == getTeamFromName("Taxistas")) then destroyElement(BlipsTaxi[source]) setElementData(Taxista,"TaxistaStat",ocupado) end end end addEventHandler ("onPlayerVehicleEnter",getRootElement(),TaxiSystemEntrarNoTaxi) -- function TaxiSystemSairTaxi(Carro,assento,jacked) if not (getElementModel(Carro) == 420) then return end if not (getElementData(source,"TaxiClient")) then return end if not (assento == 0) then local Taxista = getVehicleController(Carro) if Taxista and getElementData(Taxista,"Taxista") and (getPlayerTeam(Taxista) == getTeamFromName("Taxistas")) then removeElementData(source,"TaxiClient") setElementData(Taxista,"TaxistaStat",vazio) takePlayerMoney(source,tonumber(PrecoTaxi)) givePlayerMoney(Taxista,tonumber(PrecoTaxi)) end end end addEventHandler ("onPlayerVehicleExit",getRootElement(),TaxiSystemSairTaxi) function TaxistaSer(Carro,assento,jacked) if not (getElementModel(Carro) == 420) then return end if (getElementData(source,"Taxista")) then return end --not if (getPlayerTeam(source) == getTeamFromName("Taxistas")) then if (assento == 0) then setElementData(source,"Taxista",true) setElementData(source,"TaxistaStat",vazio) outputChatBox("[Taxi]: Você agora é um taxista, fique atento para não perder cliente",source) end end end addEventHandler ("onPlayerVehicleEnter",getRootElement(),TaxistaSer)
  21. I attached a song to my car, but when i'll go far away from car, the music starts from the beginning... s: how to fix this?
  22. client: function rtwjhrt() if isElement(ss) then stopSound(ss) return end local car = getPedOccupiedVehicle ( localPlayer ) local gettext = guiGetText ( GUIEditor.edit[1] ) local x, y, z = getElementPosition( car ) local ss = playSound3D( 'asd.mp3', x, y, z ) setSoundMaxDistance( ss, 85 ) attachElements(ss,car) end addEvent("asd123asd456",true) addEventHandler("asd123asd456",root,rtwjhrt) server: function trig() triggerClientEvent(root,"asd123asd456",root) end addEvent( "asjdlaj", true ) addEventHandler( "asjdlaj", root, trig ) Why not hear the sound another players?
  23. I want create a dxdraw rectangle and text on the map. But how to make this possible?
  24. DeadthStrock

    GUI Over DX Image

    Hellow..!! After creating a DX image [ image created using "dxDrawImage" function ], can a GUI Window set font of that DX image ?? And how ?? [ i think "guiSetFont" function is not useful in this occasion. Because I tested it :3 ]
  25. Hi guys..!! Now I am finding a way, how to create an arrow [ "Down arrow" pickup :- 1318 ] that every-time targeting one position. Like... there is an arrow on player's head and it leads the player to reach a position. So that arrow always target one position. What should i do to set the arrow's target to one position ?? Can you help me ??