Jump to content

Help with scripting


Mike269

Recommended Posts

Posted (edited)

I already asked about 35135135 times how could I learn scripting and I never learned now I'm fu ck ing ready to do it and I want to learn it I need the best way to learn it any suggestions for begginers? thanks! :)

Edited by Guest
Posted

There is no "best way". People have different ways of learning and it is up to you to decide what you like the most.

Personally, I like to learn via trial and error; it can and will be frustrating at times. But by doing this, you'll learn how to try to fix it yourself, rather than ask on a forum as soon as an issue arises.

Start with a small project, get familiar with client-sided code and then take it from there. Start with outputting messages, play around with how elements and element data work

Most importantly; Get used to navigating the MTA Wiki, being able to find functions or events to accomplish what you want is crucial.

It may not sound like much of an advice, but this is how I started and got myself into scripting and programming.

Posted

well I already know how to change things likce color spawn position messages etc but I want to learn how can i do it by myself like spawn panel and gang system in rpg servers :)

Posted

Lol how many times more I will have to tell you that I can't just get it it's hard for me cuz I'm new I just don't understand those numbers and all that shit man..

Posted

Of course , it's pretty easy.

  
  
Accepted = guiCreateButton(100, 385, 133, 22, "ACCEPT", false) -- Creation of the button "Accepted" 
  
addEventHandler ("onClientGUIClick", getRootElement(),  
function() 
    if source == Accepted then  -- If the clicked button is Accepted then 
        outputChatBox("Button Clicked") -- It output a message " Button Clicked " 
        end 
        end)  

This should make you know , how it work. If you have more questions , feel free to say :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...