Jump to content

Questions


Nicorotom

Recommended Posts

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
Link to comment
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.

Link to comment

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"

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