Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Fjose on Jan 29, 2015, 10:09 PM

Title: Vehicle Angle is not taken correctly from sserver.conf
Post by: Fjose on Jan 29, 2015, 10:09 PM
In this case, I was importing the vehicles from my 0.3 server to 0.4, all those coordinates are located in the 'server.conf', In the next code everything looks good but for any reason the angle is not taken how must be. it's like if the server is ignoring this part.  In the principle I was thinking it the problem was caused by use negative values in the 'x coordinate', but after see sk's post, I realized it the problem was with the angle how he said.

<Vehicle model="224" world="1" x="-842.2524" y="-909.7036" z="10.8677" angle="356.8192" col1="0" col2="0"/>
<Vehicle model="224" world="1" x="-896.0913" y="-999.1013" z="13.9701" angle="187.0791" col1="0" col2="0"/>

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Foi60.tinypic.com%2F25polub.jpg&hash=e480f419e535047edd73b632e2b69c17eea5a113)
Title: Re: Vehicle Angle is not taken correctly from sserver.conf
Post by: EK.IceFlake on Jan 30, 2015, 07:01 AM
It uses radians not degrees. Check out (idk)'s awesome function DegtoRad and RadtoDeg, you will find it when looking at the forum.
Title: Re: Vehicle Angle is not taken correctly from sserver.conf
Post by: . on Jan 30, 2015, 07:05 AM
Quote from: NE.CrystalBlue on Jan 30, 2015, 07:01 AMIt uses radians not degrees. Check out (idk)'s awesome function DegtoRad and RadtoDeg, you will find it when looking at the forum.

I believe this is the discussion (http://forum.vc-mp.org/?topic=227.msg1188#msg1188) you are talking about.
Title: Re: Vehicle Angle is not taken correctly from sserver.conf
Post by: EK.IceFlake on Jan 30, 2015, 10:26 AM
Quote from: S.L.C on Jan 30, 2015, 07:05 AM
Quote from: NE.CrystalBlue on Jan 30, 2015, 07:01 AMIt uses radians not degrees. Check out (idk)'s awesome function DegtoRad and RadtoDeg, you will find it when looking at the forum.

I believe this is the discussion (http://forum.vc-mp.org/?topic=227.msg1188#msg1188) you are talking about.
Yes thanks.
Title: Re: Vehicle Angle is not taken correctly from sserver.conf
Post by: Fjose on Feb 01, 2015, 01:06 AM
Just a last thing. Someone know how get the angle from the 'server.conf' because when I use veh.Angle only shows '(1,0,0,0)' and if I use veh.Rotation '(0,0,0,1)' >.>

 function ed()
 {
for ( local a = 0; a <= GetVehicleCount(); a++ )
{
local veh = FindVehicle( a );
if ( veh )
{
print( "ID: " + veh.ID + " - Model: " + veh.Model + " Angle " + veh.Angle + " Rotation: " + veh.Rotation );
}

}