Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Piorun

  1. Got it. How about female skin?
  2. Nice but then this doesnt work https://wiki.multitheftauto.com/wiki/SetPedLookAt ? Cause head is static ( i think ). And another q - how u removed CJ's head? Or meybe you didnt?
  3. Nice but then this doesnt work https://wiki.multitheftauto.com/wiki/SetPedLookAt ? Cause head is static ( i think ). And another q - how u removed CJ's head? Or meybe you didnt?
  4. I can use something like "CLuaClassDefs::Index" in Lua or only in C++?
  5. Hi, Can anyone explain me this: https://wiki.multitheftauto.com/wiki/OO ... _Structure (this metatable structure)? I know OOP in other languages like Java, PHP etc. so i'm not 'oop noob'. Anyway how I can use this knowledge to create my own Lua classes in MTA?
  6. Piorun

    Improve OOP

    I still have no clue how to extend / implement class made by me for ex. from Vehicle class or any other MTA created class.
  7. Piorun

    Improve OOP

    Hi, I'm working now on PHP. One thing i really like is OOP in this lang. We have simple classes, objects and also inheritance, interfaces etc. It would be awesome if it would be possible for ex. create PoliceVehicle class which gets all methods and variables from Vehicle class and work like a normal vehicle. It would improve iterations (cause i don't need to do getElementsByType('vehicle') and iterate all vehicle but simple getElementsByType('policevehicle')) and speed up searching. And also it would optimalize code. One more thing - improve OOP in Lua by adding class() function or some con
  8. I found this https://wiki.multitheftauto.com/wiki/Modules/cURL but god damned ... it's only on Windows
  9. Hi, Is this possible to set different REST request HTTP types like PUT, DELETE, POST and GET using fetchRemote or meybe I should use different function for this?
  10. This function only creates texture (like dxCreateTexture), not drawing it. What are you talking about alpha? It's working fine. I will edit this func to work with setting color (via HEX). Also i will try to add some extra parametr like which corner should be rounded etc. Have fun .
  11. My mistake, edited . Also I'm 100% sure that Vectors can't be sent to server/client using triggers.
  12. Guys, I found bug. Dev can't pass Vector through trigger. For ex. Server triggerClientEvent("showVector",resourceRoot,Vector3(300,300,300)) Client addEvent("showVector",true) addEventHandler("showVector",resourceRoot, function(vector) -- vector is nil outputChatBox(tostring(vector)) -- nil end)
  13. Hi, I made simple function which allows to create rounded rectangle. Really simple. 3 parameters: width, height, rounding (0-100%). More on GitHub. Have fun . Image: Link: https://github.com/Pioruniasty/MTA_rounded_rectangle
  14. Can i ask you about some example? And did you test it before?
  15. Hi, I want to make class which will be extended with Vehicle class in LUA. I know about OOP in other langs and I know how to create class in MTA. I did anyway inh with 2 classes made by me but I want to create class which will be extended by Vehicle class (have same methods and variables as Vehicle class and also mine vars and methods wrote by me).
  16. Anyone can answer me is this possible? I mean full Inheritance is possible in MTA? I did it creating my own classes but i don't know struct of OOP in MTA (there are special metamethods like __set, __get, __parent wtf ..).
  17. Guys, i need help. I have this code: function PoliceVehicle(model,position) local policeVeh = Element("policeVehicle") local vehicle = Vehicle(model,position) local PoliceVehicleMT = getmetatable(policeVeh) local VehicleMT = getmetatable(vehicle) PoliceVehicleMT.__parent = VehicleMT local PoliceVehicleClass = getmetatable(policeVeh).__class function PoliceVehicleClass:output() outputChatBox("test") end return policeVeh end which is contructor of PoliceVehicle class and i want to that class implement all methods from V
  18. Ok i did it like that: addEventHandler("onClientRender",root,function()showChat(false)end) I don't know if it's optimal but now i dont care .
  19. but u can use "showchat" via console and magic's gone .
  20. Hi guys, I want to ask you how to hide chat permanently. I tried to cancelEvent after "showchat" command but it doesnt work so then i tried to unbind 't' and 'y' key - doesn't work. I used on c-side unbindKey("t") unbindKey("y")
  21. There should be possibility to input files from local computer. I know it's kinda risky because someone could paste .lua code and execeute it but hey - let's add some client validation like in javascript or html ver. 5. It will help to create some big server where ppl dont need to use web page to implement some models or textures.
  22. Which ver. of MTA should i install on my Linux distro to work normally with MTA using Wine. I have low end laptop so i don't think so i can run Ubuntu + VMWare (anyway i don't want to install another OS to run just only one program or it's some diffrent option to run MTA without installing Windows using VMWare). Meybe not so low end but it's really slow. On my PC where i have good hardware I'm running Ubuntu + VMWare really smooth. Please help .
  23. Question is why CEF is slow? I mean when i'm animating CEF works like 20 FPS. Meybe it's wrong because i'm using guiCreateBrowser? But with dxBrowser i have no input.
  24. I think i fixed a problem.
  • Create New...