

Let’s break this code into pieces and explain part by part. getPlayerName (source ), source, 255, 0, 0 )ĪddEventHandler (“onPlayerJoin”, getRootElement (), outputName ) OutputChatBox (“Welcome to the server ” . If this part isn’t clear enough, post below. We will be making a serversided script therefore we are going to use server functions (Note: Many MTA functions can be used in clientside and serverside, but some are only working in serverside/clientside scripts!). Clientsided files (scripts) are downloaded to your computer when joining a server while serversided files don’t. Difference you mean? Clientside functions and Serversided CANNOT work in a same script. MTA uses two type of functions – clientside and serverside. Useful tools: Notepad++ (Highly recommended, highlights your functions and make scripting A LOT easier) or Unofficial MTA Script EditorĪll MTA functions are located here: The official MTA Wiki pageīefore we start. Type – client or server – by default (if not defined) the type of script will be server Why? Because meta needs correct info so it could load your script for server Src – the name must correspond to your script name, if it is named a then we will rename it from a to a Type – type of your resource, we will use “script”ĭescription – optional, explain what your script does in couple of words lua file is your script which should be defined in your meta.xml (detailed explanation further in tutorial)Īuthor – self explanatory, the author of this resource, you may put your name here xml – Meta is basicly telling the server what your resource contains and how should the files within be used, your resource cannot work without a working meta!!Ģ) file. There are two things your resource HAS to contain:ġ) meta. These are all scripts and gamemodes provided by MTA and everyone should have them as they come by default with your MTA installation. Now when you have located where your resources folder is, you may see bunch of. There we go, you’re now here: MTA San Andreas 1.3\server\mods\deathmatch\resources

Saes rpg windows#
This folder contains all the resources your server will run, including maps, scripts, gamemodes et cetera.ġ) Find your Multi Theft Auto directory (By default (for Windows users) it’s in Program Files, Disk C)Ģ) Open MTA Directory, then folder “server” > “mods” > “deatchmatch” > “resources” I will be following some Wiki way of learning, so we are starting with “Locating your Resources folder” I hope some of our community scripters will help me out a bit and suggest what to improve to make this easy to understand. I will do my best to explain this in a more noob-friendly way than MTA Wiki does.
Saes rpg series#
Welcome to my first of series tutorials of MTA Lua scripting.
