function onScriptLoad() {
gate <- ::CreateObject(310, 1, -276.618, -495.992, 10.2778, 255);
gateStatus <- true;
key_M <- ::BindKey(true, 0x4D, 0, 0);
}
class WepPickup extends PickupClass {
wepID = null;
ammo = null;
constructor(model, pos, wepID, ammo) {
base.constructor(model, pos);
this.wepID = wepID;
this.ammo = ammo;
}
function onPickupPickedUp(player) {
player.GiveWeapon(wepID, ammo);
}
}

--------------------------------------------------
VC:MP ROTATION FIX RULES
--------------------------------------------------
When converting GTA Vice City maps (.IDE + .IPL)
to VC:MP XML format:
ALWAYS preserve original object rotations exactly.
--------------------------------------------------
IMPORTANT ROTATION RULE
--------------------------------------------------
VC:MP may incorrectly interpret some rotations
when quaternion conversion is used.
To avoid:
- rotated ramps
- broken roads
- tilted objects
- twisted buildings
- incorrect LOD orientation
ALWAYS use:
<rotation format="axisangle" />
inside map object entries.
--------------------------------------------------
CORRECT FORMAT
--------------------------------------------------
Example:
<object id="6400" model="400">
<position x="0" y="0" z="0"/>
<rotation format="axisangle"
x="0"
y="0"
z="1"
angle="90"/>
<interior>0</interior>
</object>
--------------------------------------------------
IMPORTANT CONVERSION RULES
--------------------------------------------------
- preserve original IPL rotation values
- preserve original object orientation
- do NOT normalize rotations
- do NOT auto-convert to quaternion
- do NOT swap axes
- do NOT invert X/Y/Z
- do NOT reinterpret GTA rotations
- do NOT recalculate angles
--------------------------------------------------
LOD RULES
--------------------------------------------------
For LOD objects:
- preserve identical rotation
- preserve identical position
- keep visibility high (3000)
- use:
<collision type="none"/>
--------------------------------------------------
OBJECT ID RULES
--------------------------------------------------
VC:MP map IDs must follow:
map ID = object ID + 6000
Examples:
object 0 -> map 6000
object 1 -> map 6001
object 400 -> map 6400
Always continue IDs sequentially.
Never duplicate IDs.
--------------------------------------------------
FINAL RESULT
--------------------------------------------------
Correct conversion should prevent:
- object rotation bugs
- ramps facing wrong direction
- floating roads
- broken stunt maps
- twisted LODs
- corrupted map orientation
and preserve stable VC:MP compatibility.
--------------------------------------------------
VC:MP 2DFX XML FORMAT
--------------------------------------------------
VC:MP supports 2DFX effects inside objects.xml.
2DFX effects must be written INSIDE the related object:
<object>
...
<effect>
...
</effect>
</object>
Do NOT place 2DFX in map.xml.
--------------------------------------------------
2DFX CONVERSION RULES
--------------------------------------------------
The IDE may contain a:
2dfx
section.
Each 2DFX entry belongs to an object model.
When converting:
- remap original model IDs to the new VC:MP model IDs
- attach effects to the matching object definition
- preserve local offsets
- preserve RGB colour
- preserve alpha if applicable
- preserve corona texture
- preserve shadow texture
- preserve light parameters
--------------------------------------------------
VC:MP LIGHT EFFECT FORMAT
--------------------------------------------------
Example:
<effect>
<position x="0" y="0" z="0"/>
<colour r="255" g="255" b="255" a="200"/>
<type>0</type>
<light>
<distance>450</distance>
<outerrange>12</outerrange>
<size>1</size>
<innerrange>4</innerrange>
<shadowintensity>40</shadowintensity>
<flash>1</flash>
<wet>1</wet>
<flare>0</flare>
<flags>1</flags>
<corona>coronastar</corona>
<shadow>shad_exp</shadow>
</light>
</effect>
--------------------------------------------------
SUPPORTED TYPES
--------------------------------------------------
type 0 = light
type 1 = particle
--------------------------------------------------
IMPORTANT
--------------------------------------------------
2DFX entries are local offsets relative to the object origin.
Do NOT convert them as normal map placements.
Do NOT place them in map.xml.
Always attach them to the matching object inside objects.xml.