Jump to content

Beginning


Dreft

Recommended Posts

Hello.. I've scripted SA-MP(pawn) for about 4 months, and I want to get over MTA(Lua). I want to know, from where I need to start ? I mean, i don't even know how to change gamemode in server files :? And i have few more questions :

1. Is that true that Lua is very difficult to script ?(harder than pawn?)

2. What is Server Side and Client Side functions ?

3. As i ask in first line, from where i need to start?

4. What Lua editor is most used ?

5. What is vehicle,objects,pickups etc. limits in MTA ?

Hope you understand everything, because my English sometimes sucks :D

Waiting answers :)

Link to comment

1. Lua is pretty easy. Getting used to Lua, though, might take some effort. I've never tried Pawn, so I can't tell you if it's easier or harder, but from what I heard so far Lua is easier.

2. Server-side scripts are like the scripts in SA-MP. The server handles what you say. These functions are usually synched better than the client-side variants, and server-side offers some key functions like spawnPlayer. Whereas client-side is calculated and executed at the player's PC. This means it doesn't have to be send over the internet. Also it contains more graphical things like GUI.

3. You can start from the wiki. (the links I gave) Some parts may be a little confusing, but someone might improve it soon. Who knows. Anyway, best place to start learning how to use a server is HERE, best place to start for scripting is HERE.

4. I think it's the best to use Notepad++, simply because it's great. Loads fast, highlights pretty much all standard Lua functions and supports more languages than Lua alone.

5. Most of these are not properly documented (I think...)

- Vehicle: Well, I guess you won't get to the limit very fast, because I guess it's as much as your PC can take. :P

- Objects: I guess the same

- Pickups: I guess the same

- Markers: Corona's: 64, All other types together: 32

- Player: It was 128 or 256 I think... I'm not even sure IF there's a limit for players, but MTA uses a bit more net than SA-MP, so it's pretty much easier to hit your internet limit for this one, rather than the player limit :P

If you have any more questions, feel free to ask. (Do try to search for em first though)

Link to comment

Lua is much much easier, i think anyone with good knowledge of both languages can tell you that.

To elaborate on server and clientside scripts, clientside scripting gives you much more access to the game than a serverside script. All SA-MP scripts are Serverside, as Gamesnert said. But having scripts on the client means you can get much more accurate data and produce scripts that dont use any bandwidth.

For example, in SA-MP, if you wanted to create a speedometer, it would have to estimate the player's speed (the server doesnt know this for sure), and send a request on a timer to update the player's on screen display. This is not only accurate and slow, but also uses a lot of bandwidth.

In MTA, a clientside script can be used. The clienside script simply gets the speed directly from GTA (and is therefore very accurate), and can update every frame rather than second. This means you can make it look a lot better and it is much more accurate. Throughout this process the Server has not been involved at all - no bandwidth is used at all. The client has produced all this information for you.

The limits that Gamesnert stated are correct, but he's referring to on-screen limits. That means you can have 32 checkpoint markers on the screen at one time. But you can have 65536 elements altogether. Also, MTA streams all objects/vehicles/pickups for you. You do NOT have to write a script to stream objects (this means you can have practically limitless objects)

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