Jump to content

Search the Community

Showing results for tags 'lua'.

  • 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. 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...
  2. 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.
  3. 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...
  4. 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.
  5. Where can i download a good inventory script for rp server?
  6. 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 я узнал, что многое другое, что я пропустил часть панели входа в систему, и я хотел узнать, можете ли вы объяснить, как я могу создать
  7. 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
  8. 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?
  9. 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.
  10. 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.
  11. 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!
  12. 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!
  13. 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..
  14. 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?
  15. 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)
  16. 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?
  17. 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?
  18. 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
  19. 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 ]
  20. 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 ??
  21. I want create a dxdraw rectangle and text on the map. But how to make this possible?
  22. i added this line to my script: takeWeapon( source, 38, 99999 ) buuut, does not working.. how to fix this?
  23. this is my code: function onQuit(thePlayer) for i,v in pairs(getElementsByType("vehicle",resourceRoot)) do if getElementData(v,"oveie") == getPlayerName(thePlayer) then destroyElement(v) end end end addEventHandler ( "onPlayerQuit", root, onQuit ) but this does not working.. why? how to fix it?
  24. local Z1 = createColRectangle(1577, 1723, 60, 140 ) -- LV hospital function spawnRoadblock(id, x, y, z, rx, ry, rz, dim, int) if (not id) then return end if (id == 1225 and dim == 0) then outputChatBox("Explosive barrels can not be placed in main dimension", client, 255, 0, 0) return end if (id == 978) then z = z-1 end local accName = getAccountName(getPlayerAccount(client)) local object = createObject(tonumber(id), x, y, z, rx, ry, rz) setElementDoubleSided(object, true) setElementFrozen(object, true) setElementData(object, "creator", accName, false) roadblocks[object] = {object, getAccountName(getPlayerAccount(client))} if (tonumber(dim) ~= 0) then setElementDimension(object, dim) end if (tonumber(int) ~= 0) then setElementInterior(object, int) end if (id ~= 1225) then triggerClientEvent(client, "nobreak", client, object) end if not isElementWithinColShape (object, Z1) then destroyElement(object) end end addEvent("Zone.ZRB.AddRoadblock", true) addEventHandler("Zone.ZRB.AddRoadblock", root, spawnRoadblock) Hello, in this script as you see it's about adding a Road Block.. but i got one problem and it's i need to make that if the Object was outside a specific area so it will get auto removed, any help? I appreciate who fix this coding... Thanks.
  25. Hi guys, We working a new roleplay server project. We have some ideas for this server but we do not have a scripter. Someone who want to help us send private message. Money is not important
×
×
  • Create New...