In this tutorial I'm gonna explain to you how you can create and run a script or resource in your Multi Theft Auto servers. First let's talk about the difference between scripts and resources, a script is basically just the file where your script(s) are written in while a resource is a whole set of scripts indexed by a meta file named meta.xml.
Now let's make a script file server.lua with this content:
then the meta file meta.xml
<script src="server.lua" type="server" />
now add these files into a folder, this is your resource which you are now going to copy to: /mods/deathmatch/resources. Reboot your server from control panel or type refresh <name_of_folder> then start <name_of_folder> to start it and you should see the message "Hello world" in chat for all players online at the moment.
Last but not least, let's not forget the SLA talking about server reboots, we don't wanna have to restart everything again just because the server is restarted so let's open: /mods/deathmatch/mtaserver.conf and scroll down to bottom. There is a list of resources that will start together with your server, add your resource to that list. And that's it folks, happy coding.