Jump to content

Piorun

Members
  • Posts

    421
  • Joined

  • Last visited

Posts posted by Piorun

  1. I have this code

      
    Items = {} 
    Items.__index = Items 
      
    function Items.new(name) 
        local self = setmetatable({},Items) 
        self.name = name 
        return self 
    end 
    

    I want to make field name to be private (only accessible by class, not globally). How?

  2. Hi,

    I want to ask is this possible to check if i am on client or server side in shared .lua files?

    I mean i want to make some function for ex. named checkSide() and just make some if. How?

    function checkSide() 
    if clientSide then 
    -- something happens when function is called client side 
    else 
    -- something happens when function is called server side 
    end 
    end 
    

  3. Hi,

    I want to ask you is it possible to run MTA on Linux but with Windows (8.1 btw.) installed in other partition? I tried to run .exe of MTA (via Wine) but it needs Visual C++ 2013. Wine have problem with it.

    Or mb you have some other ideas.

    My linux distro is Linux Mint.

  4. Hi

    How to create class which will be "visible" by code through all the server resources (something like custom events)?

    I know OOP programming in other languages but y'know - i want to make some cool stuff in Lua too :D .. i hate functional programming.

  5. Tak, ale plugin ten jest na tyle biedny, że podpowiada tylko funkcje. Niezależnie od tego czy plik jest ze strony serwera czy klienta. Właśnie to na celu ma mój program - ułatwić tworzenie zasobów. Przykładowo jeżeli będziemy mieli takie widzimisię stworzyć nowy zasób to zrobimy to stosunkowo łatwo wybierając odpowiednią opcję z menu. Proste, szybkie i skuteczne.

    Co do podpowiadania funkcji to również dołożę starań, by dołączyć do danych funkcji parametry wymagane i opcjonalne. Tak, by zminimalizować ilość wejść na wiki, a tym samym zmniejszyć czas tworzenia kodu.

    Wczoraj na swoim FP zamieściłem poglądowy wygląd tego IDE. Wygląda on tak:

    https://scontent-fra3-1.xx.fbcdn.net/hp ... 0515_o.png

    Aktualnie:

    - program samodzielnie znajduje ścieżkę dostępu do folderu MTA.

    - pobiera wszystkie dostępne w katalogu "resources" zasoby.

    - koloruje składnie.

    - parę drobnych rzeczy.

    Mam nadzieję, że się podoba i że skorzystacie z tego programu.

    Będzie on dostępny dla wszystkich za darmo. Będzie aktualizowany i mam nadzieję, że deweloperzy MTA zaimplementują go do MTA jako dodatkowy program przy instalacji(tak jak w przypadku PAWNO w SA-MP).

  6. Hi guys,

    I'm making another new and fresh Lua Editor (Qt C++) specially for MTA but i need one think - how is in registry saved MTA directory?

  7. Cześć,

    Zanim napiszę oficjalną "zapowiedź" tego programu to chciałbym się najpierw podzielić się tą informacją z osobami, które mówią po Polsku :P.

    Tworzę od paru dni IDE pod MTA. Nie tylko pomoże on w programowaniu ale również w konfigurowaniu serwera.

    Myślę nad paroma usprawnieniami (przeglądanie ID pojazdów, skinów itd.) oraz możliwościami personalizowania programu (skórki). Co o tym sądzicie?

    Co do specyfikacji IDE to program oparty jest o Qt Creator (C++). Pójdzie raczej na każdym sprzęcie i co ważne - również na każdym systemie.

    Piszcie jeżeli macie jakieś propozycje (na dzień dzisiejszy jestem raczej w stanie wykodzić wszystko). Wiem, że mało opisałem aczkolwiek jeżeli ktoś chce zobaczyć więcej to zapraszam do śledzenia mojego kanału na Hitbox.tv (http://hitbox.tv/Piorun), bo planuję udostępniać proces twórczy na żywo :).

  8. Hi,

    I made some simple code :

      
    createElement("whatever", "1") 
    createElement("whatever", "2") 
    ... 
      
    

    and later in code i want to create loop for every elements specified by type. I mean something like

    for key,val in ipairs(getElementsByType("whatever")) do 
    

    but i know that getElementsByType have only few element types declared inside MTA. Could u help me find another way?

  9. Hi guys,

    I want to ask you why i cant install MTA on Ubuntu (MTA 1.4 ofc)? I installed GTA:SA (and it works fine) on Wine (using PlayOnLinux) and when im trying to install MTA it stuck on starting some vcredist12_x86 and then i have blank error and rest installation is going fine. But when im trying to start MTA wild error appears saying that installation gone wrong, please reinstall.

    What should i do?

  10. Doesnt work:

    Player.test = "Piorun" 
      
    addCommandHandler("oop", 
        function(player) 
            outputChatBox(player.test) 
        end 
    ) 
    

    Edit.

    Anyway why MTA's devs let Lua devs use OOP in MTA if we can't export methods and variables through other resources added to existing Class ? :/

  11. ixjf thanks for info. I'll try to work with sbx320's classlib. Thanks again :).

    @EDIT

    That classlib is server or client or both side :P ?

    And anyway could you show me some example how to add new var to Player class with that lib?

×
×
  • Create New...