Jump to content

Questions


Nicorotom

Recommended Posts

Posted (edited)

Hello,

i have a lot of Question:

What must be written into a Server-Side-Script?

What must be written into a Client-Side-Script?

How i add a Mod to the Server, so that everyone download it on connect?

What must i note, what risk's are there?

Thank you for answer my Questions!

Greetings,

Nicorotom

Edited by Guest
Posted

https://wiki.multitheftauto.com/

has answer to all your questions :)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
What must be written into a Server-Side-Script?

In server-side scripts you should put the main code of your resources. Including player spawn and that sort of things.

What must be written into a Client-Side-Script?

Things you want to run faster, without the real need of sync, or things like drawing stuff and creating GUI has to be done client-side.

How i add a Mod to the Server, so that everyone download it on connect?

See in the Server Manual. (DE version)

What must i note, what risk's are there?

Depends on what you mean. But generally, beside bandwidth usage, there's nothing to worry about.

Projects:

Slothbot | Maximap

Posted

To the Mods:

I must create a folder with the example Name: carmods

Then i must only put my carmods into the folder?

Or must i create a .xml or something else?

Can you please give an detailed answer?

Posted

1. Create a new folder called "carmods" (or whatever you want) in C:\Program Files\MTA San Andreas\server\mods\deathmatch\resources

2. put your car mod files (for example infernus.dff and infernus.txd) in this folder

3. in that folder, create a file called "client.lua"

4. put this code in the "client.lua", change the coloured parts with the stuff you need (red = is the ID for the car you want to replace, blue = your car mod files) and save the file.

function replaceCar() 
txd = engineLoadTXD ( "[color=#000080]infernus.txd[/color]" )
engineImportTXD ( txd, [color=#BF0000]411[/color])
dff = engineLoadDFF ( "[color=#000080]infernus.dff[/color]", [color=#BF0000]411[/color])
engineReplaceModel ( dff, [color=#BF0000]411[/color])
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceCar)

5. create a file called "meta.xml" in the folder

6. put the following code in it and save the file (again -> dont forget to change the coloured parts with the stuff you need)

<meta>
   <script src="client.lua" type="client" />
   <file src="[color=#000080]infernus.txd[/color]" />
   <file src="[color=#000080]infernus.dff[/color]" />
</meta>

7. done .. now you got your own resource to replace cars :)

If you dont know how to use resources on your server, have a look at the mta wiki

https://wiki.multitheftauto.com/wiki/Server_Manual

--Push--

please be more patient next time and avoid double posts :wink:

//edit: hier auf deutsch "klick mich"

Posted

Thank you Satan :D

Now my Turismo is an Ferrari and my NRG is a Suzuki ;)

@Topic

What must be written into a Server-Side-Script?

What must be written into a Client-Side-Script?

Please write as a List! And please write Examples.

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