Jump to content

New in MTA Scripting


Recommended Posts

Hello Community, I´m new in this world of Scripting and i want to learn how to code by myself, the people in this forum who are expert in Lua and MTA Scripting can you give me any advice on where do i start and Some sources on  where i can go to start learning and  other advices?

 

Thank you :)

Link to comment
2 hours ago, NeXuS™ said:

If you are totally new, you should start by learning the actual programming. Lua manual is a good way to start.

If you are done reading the manual, and you kinda understand everything which is written there, you can change to the MTA Wiki which has a lot of useful information.

One question if i learn Lua and i become an expert will i understand the MTA Wiki easy and how much will it take to learn MTA Script

Link to comment

It is beginner friendly. Videos can help, but its much easier to understand it if you read it over and over again.

You'll be able to understand coding in general, so you'll kinda understand more from the wiki page, yeah.

  • Like 1
Link to comment

Learning pure Lua might be too difficult and boring for beginners who have never had any programming experience. I advise you to begin with simple scripts from MTA Wiki. You should take attempts to edit original code, experiment with it. For example, script with command "/ping" that will output your ping in the chatbox:

function outputMyPing(player, cmd)
    local ping = getPlayerPing(player)
    outputChatBox("* Your ping: ".. ping, player, 255, 255, 255, false)
end
addCommandHandler("ping", outputMyPing)

How would you improve this command? You may add some colors in the chat message, some conditions(if ping is low then message is green, red otherwise) and etc. There're no limits in ideas, and everything depends on your imagination.

 

Note that you should have some basic programming knowledges including variables, arrays, loops and etc.

Edited by NeverUnbeatable
Link to comment

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...