Custom Files

From Vice City Multiplayer
Revision as of 14:27, 22 November 2014 by Ysc3839 (talk | contribs) (Created page with " == Sprite == Place your images inside the folder <root>/store/sprites/ e.g. /store/sprites/Filename.png Then use the function CreateSprite in your script like so: CreateSp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

Sprite

Place your images inside the folder <root>/store/sprites/

e.g. /store/sprites/Filename.png

Then use the function CreateSprite in your script like so:

CreateSprite("Filename.png", x, y, rX, rY, rotation, alpha)

Maps

Inside your root server folder create the following folders:

<root>/store/maps

<root>/store/objects


Inside the maps folder place an xml file with any name you want with the following structure:

<?xml version="1.0" encoding="ASCII" ?>
<itemlist>	
	<item model="6000" name="drugstoreint">
		<position x="-856.7597046" y="-79.71799469" z="12.73265266" />
		<rotation format="axisangle" x="0.0" y="0.0" z="0.0" angle="1.0" />
	</item>

	<item model="6001" name="drugstoreext">
		<position x="-856.3429565" y="-79.98773956" z="12.64423846" />
		<rotation format="axisangle" x="0.0" y="0.0" z="0.0" angle="1.0" />
	</item>
</itemlist>

The IPL files have the following structure:

1474, drugstoreint, 0, -856.7597046, -79.71799469, 12.73265266, 1, 1, 1, 0, 0, 0, 1

model name (useless) x y z (useless) (useless) (useless) rot.x rot.y rot.z rot.angle

Objects

Custom object models start with ID 6000.

Create a file called objects.xml in the objects folder with the following structure:

<?xml version="1.0" encoding="ASCII"?>
<objectlist>
	<object id="0">
		<flags value="0" />
		<collision path="drugstoreint.col" />
		<texture path="chem2.txd" />
		<model path="drugstoreint.dff" distance="350" />
	</object>
	<object id="1">
		<flags value="0" />
		<collision path="drugstoreext.col" />
		<texture path="chem.txd" />
		<model path="drugstoreext.dff" distance="350" />
	</object>
</objectlist>

After you've done all that, zip up your col, diff and txd files using 7zip. The file extension must be .7z

Place the .7z with a filename like <somename>_unp.7z in the store folder.

You can also forget the map file and use the custom model IDs (6000+) inside your script.