Vice City: Multiplayer

VC:MP Discussion => Support => Topic started by: KAKAN on Feb 07, 2016, 05:18 PM

Title: [server]xml Help
Post by: KAKAN on Feb 07, 2016, 05:18 PM
I need to make about 2-3 objects into a map so people don't fall through them when they teleport. I don't quite understand how the angles work in XML would really appreciate if you could help me convert this:
CreateObject(1083,0,Vector(-34.6886, 1763.63, 32.1387),255).RotateToEuler(Vector(0, 0, -1.56),1); // House

into XML or just tell me how the angles will look in the XML.

I tried this:-
<?xml version="1.0" encoding="ASCII" ?>
        <itemlist>
                        <item model="183" name="NUb :P">
                        <position x="-34.6886" y="1763.63" z="32.1387" />
                        <rotation format="axisangle" x="0" y="0" z="-1.56" angle="1" />
                </item>
        </itemlist>
Didn't work. Can someone tell me the mistake I did?
Title: Re: [server]xml Help
Post by: Xmair on Feb 08, 2016, 10:08 AM
You used 183 instead of 1083 in the xml version.
Title: Re: [server]xml Help
Post by: KAKAN on Feb 08, 2016, 10:20 AM
Quote from: Xmair on Feb 08, 2016, 10:08 AMYou used 183 instead of 1083 in the xml version.
Fixed that. doesn't work.
Title: Re: [server]xml Help
Post by: Xmair on Feb 08, 2016, 12:44 PM
Your code:
<?xml version="1.0" encoding="ASCII" ?>
        <itemlist>
                        <item model="183" name="NUb :P">
                        <position x="-34.6886" y="1763.63" z="32.1387" />
                        <rotation format="axisangle" x="0" y="0" z="-1.56" angle="1" />
                </item>
        </itemlist>
Fix:
<?xml version="1.0" encoding="ASCII" ?>
        <itemlist>
                        <item model="1083" name="NUb?"/>
                        <position x="-34.6886" y="1763.63" z="32.1387" />
                        <rotation format="axisangle" x="0" y="0" z="-1.56" angle="1" />
                </item>
        </itemlist>
Untested.
Title: Re: [server]xml Help
Post by: Thijn on Feb 08, 2016, 05:19 PM
Do you even read @Xmair
You can clearly see your so called fix breaks the XML. That item node actually ends below. It's just not properly formatted..
Title: Re: [server]xml Help
Post by: Xmair on Feb 08, 2016, 05:37 PM
Just forgot that since I don't xml much.
Title: Re: [server]xml Help
Post by: Thijn on Feb 08, 2016, 06:07 PM
local obj = CreateObject(1083,0,Vector(-34.6886, 1763.63, 32.1387),255);
obj.RotateToEuler(Vector(0, 0, -1.56),0);
print( obj.Rotation );
Output: (0, 0, -0.703279, 0.710914)

XML:
<?xml version="1.0" encoding="ASCII" ?>
<itemlist>
<item model="1083" name="Home">
<position x="-34.6886" y="1763.63" z="32.1387" />
<rotation format="axisangle" x="0" y="0" z="-0.703279" angle="-0.710914" />
</item>
</itemlist>
(Yes the positive to negative on the angle attribute is intended.)

Untested.