Jump to content

Rataj

Members
  • Posts

    98
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Rataj

  1. Actually you can easily re-create it yourself.

    Just make some table with all your mods, create a GUI for it and then use these functions to load and unload mods:

    -- load
    engineReplaceModel
    engineImportTXD
    
    -- unload
    engineRestoreModel

    Check MTA wiki for more information on how to use them.

  2. I would like to wish Merry Christmas with lots of love to the generous MTA staff team, contributors, heroes and the whole MTA community.

    Whatever is beautiful, whatever is meaningful, whatever brings happiness, may it be yours this holiday season and throughout the coming year.

    Thank you everybody for another cheerful year here in MTA community.

  3. Prozkoušej, jestli ti to dělá i v singleplayeru, nebo třeba jen s konkrétním zařízením, apod. abys vůbec věděl, kde máš chybu hledat.

    Určitě taky zkontroluj, že máš zvuk vůbec zaplý a to jak u MTA aplikace ve Windowsu, tak přímo v herním nastavení.

    Dřív se to tu na fóru v support sekci (kam tyto věci patří) už párkrát řešilo. Jednomu hráči například pomohlo vypojit sluchátka, zapojit je znovu, chvíli počkat a pak až zapnout MTA. Dalšímu pomohlo přeinstalovat GTA, jelikož si pokazil hru nějakým audio módem. Pomoct může třeba taky opětovná instalace nejnovější verze MTA a DirectX, nebo aktualizace zvukových ovladačů.

    Můžeš tyhle řešení prozkoušet, každopádně nejlíp uděláš, když napíšeš do support sekce: https://forum.multitheftauto.com/forum/83-client/

    Do support sekce piš samozřejmě v angličtině. Dost pravděpodobně ti někdo z MTA Teamu odepíše, aby jsi poslal log z MTADiagu (což je program, který odhaluje problémy s MTA klientem). Z logu pak už pak mohou vyčíst, co je špatně a poradit ti, jak problém vyřešit.

  4. 2 hours ago, Krazy said:

    I actually edited the gta3 file, but i don't see any changes in game, is it possible to edit it for mta ?, i want just to remove some laggy leaves from the trees but i don't see any effects

    Seriously? C'mon, leaves on trees aren't lagging your game, are they?

    Anyways.. you can remove all objects of some model using mentioned function removeWorldModel.

    Example:

    removeWorldModel(656, 10000, 0, 0, 0) -- removes all instances of model 656 on the map

     

  5. You can replace string with function, that will return string. Then with use of exports, conditions and tables you can make very reliable multi-language system. Or you can use only tables and identify language by key.

    Example of second method (using only tables):

    -- you have to define table with all strings in all supported languages
    language_strings = {
    	['EN'] = {
    		"Your username/password was incorrect.",
    		"Login Error",
    	},
    	['CZ'] = {
    		"Tvé jméno/heslo je neplatné.",
    		"Chyba při přihlášení",
    	}
    }
    
    -- then you can do this in your function, after you get "lang" variable for example from getElementData
    triggerClientEvent(source, "makeMessage", root, language_strings[lang][1], language_strings[lang][2]) 

     

  6. Okej, tím jsem si nebyl jistý no. Každopádně tohle fórum je určené pro všechny hráče MTA, problém je, že se z většiny využívá spíše lidmi, kteří se nějak zajímají o vývoj serverů, atp., o to větší je ten problém v CZ/SK komunitě, protože ta tady moc nefunguje. Ono celkově je problém, že CZ/SK komunita MTA nemá žádné takové své "zázemí". Tím pádem se nikdo nemá kam obrátit, když hledá spoluhráče, nebo pomoc s vývojem serverů. Je to tak nějak rozkouskováno na menší skupinky.

  7. Carefully swap it to server-side, make sure, everything is right for server-side as it should be. If it won't work again, then reply with debugscript errors, so we can help you specifically with some mistake you probably made previously when swapping to server-side.

  8. If you're good at HTML, CSS and JavaScript, you can do it as a .html file and draw it with CEF. I think this login panel is done by using CEF, not by DX.

    So rather take a look at functions for Element/Browser

    Which is also a lot easier than doing this panel with DX.

    • Like 2
  9. It's object named DanceFloor1 (ID 19128) but it's only in SAMP. You can extract it and import it into MTA using functions nikitafloy shown you.

  10. 34 minutes ago, Dimos7 said:

    for k , blip in ipairs()) do

    That's nonsense.

    Try it like this:

    addEventHandler("onClientVehicleEnter", root,
    function()
    	for k,v in ipairs(getAttachedElements(source))do
    		if(getElementType(v) == "blip")then
    			destroyElement(v)
    		end
    	end
    end)

    Also I believe you want to call your streamIn function from onClientVehicleExit event handler too.

  11. There is RanSpawn_Z function (starting on line 385 in zombie_server.lua), you have to use setElementDimension after ped is created.

    Also if you're using stream method to constantly spawn zombies near players, don't forget to add statement, which will check if player is in that dimension (SpawnZombie function).

  12. 29 minutes ago, SoulHunteR said:

    No ako tak pozerám tak naša scéna ohľadom LUA alebo len mappingu pre MTA je dosť mala oproti ostatnými no nesledujem ich všetky tak neviem. :D Chcelo by to rozšíriť len neviem stále ako.

    No, je to smutný, ale kromě sebe vím (z CZ/SK scény) jen o dvou lidech, o kterých by se dalo říct, že umí skriptovat na středně pokročilé, nebo lepší úrovni. Pak vím o dost lidech, kteří se v tom orientují (a dost z nich o sobě i říká, že umí skriptovat), ale ve skutečnosti jen editují části existujících cizích skriptů. Jinak by se tu našli cca 2-3 lidi, o kterých vím, že se LUA učí a snaží se v tom MTA něco vytvořit, ale ještě potřebují svůj čas, než od nich budeme moct očekávat něco velkého. ;)

    Každopádně je to velká škoda, že ta CZ/SK komunita není v tomto směru obsáhlejší. Unavují mě servery, které na CZ/SK scéně vidím, když jsou jeden vedle druhého tak stejné. Snad se v budoucnu najde více lidí v tomhle okruhu. Já sám delší dobu přemýšlím o tom, že s MTA skončím a to hned z několika důvodů, na druhou stranu se mi moc nechce "zahazovat" více, než 3 roky zkušeností a server, který existuje téměř stejně dlouhou dobu.

    EDIT: Co se mappingu týče, tak na tom nejsme vůbec špatně. Mapperů je dost, spíš CZ/SK hráčů tady na fóru je málo.

  13. 1 hour ago, mgmmcaobbm said:

    Well, if you want to run it as a screen or do something else while at it, that's why he's not running the server directly.

    That would be reason for creating .sh file (that will for example start the server with screen utility), not renaming "mta-server" to that.

  14. Maybe do some more calculation around text width, etc..

    Or take a look at dxCreateRenderTarget. You can create one render target (including nametag and flag), then you'll only calculate and draw that render target as one dx element, so there will be no problems like this and you can easily add new things into this render target whenever you want.

    (There may be an easier way to do this, but this is best solution I can think of right now)

    • Like 1
  15. 22 minutes ago, ZeaD22 said:

    i made it

    
    	outputChatBox("#ff9999Hello "..getPlayerName(player).." #ff9999, Merry Christmas :) .",player,0,0,0,true)
    

    says WARNING: skin\server.lua:12: Bad argument @ 'getPlayerName'  [Expected element at argument 1 , got nil ]

    and WARNING: skin\server.lua:12: attemp to concatenate a boolean value 

    You also have to pass argument of that player (like: e(player)).

    But not to unnecessarily complicate things, what you want to do can be easily done using only client-side.

    Example (untested):

    local replaced = false
    	
    function car()
    	if replaced then
    		engineRestoreModel(411)
    		replaced = false
    	else
    		infernusTexture = engineLoadTXD("infernus.txd")
    		engineImportTXD(infernusTexture, 411)
    		infernusTexture = engineLoadDFF("infernus.dff", 411)
    		engineReplaceModel(infernusTexture, 411)
    		replaced = true
    	end
    end
    addCommandHandler("xmas", car)
    
    function e()
    	outputChatBox(" ",0,0,0,true) 
    end
    
    function onStart()
    	car()
    	e()
    	outputChatBox("#ff9999Hello "..getPlayerName(localPlayer).." #ff9999, Merry Christmas :) .",0,0,0,true)
    	e()
    	outputChatBox("#ff9999To Enable / Disable The Christmas Infernus Skin , Please use the command #ff0000/xmas",0,0,0,true)
    	e()
    	outputChatBox("#ff9999 Note : This Mode Made By : #286699-DG|#Zea#990000D22",0,0,0,true)
    	e()
    end
    addEventHandler("onClientResourceStart", resourceRoot, onStart)

    And I recommend you not to copy-paste it, but to learn from it. If you don't understand why I did some piece of this code, just ask, we are here to help and you will not learn it, if we'll do complete code for you. I did it now only to show you, that outputChatBox is not only server-side function, also engineRestoreModel is the function you were looking for (to disable the Infernus skin).

  16. It's obvious that he's trying to destroy an element saved in the element data, also it's probably inside onPlayerWasted function (source, killer).

    Problem is, getElementData(source, "playerCol") is not set.

    You can get rid of these warnings using this (replace second line of your shown code with those lines):

    local playerCol = getElementData(source, "playerCol")
    if playerCol and isElement(playerCol) then
    	destroyElement(playerCol)
    end

    But that doesn't change anything on fact, that you have to save your element to the element data first (using setElementData(thePlayer, "playerCol", YOUR_ELEMENT) on spawn or wherever you are creating "YOUR_ELEMENT").

    EDIT: By the way koragg, easier way to remove element data is function named removeElementData.

    • Like 1
×
×
  • Create New...