[HELP] SetVehicleZAngle.
#1

pawn Код:
public OnVehicleSpawn(vehicleid)
{
        new Float:x;
        x = CarInfo[vehicleid][cAngle];
            SetVehicleZAngle(vehicleid, x);
            SetVehiclePos(vehicleid,CarInfo[vehicleid][cLocationx],CarInfo[vehicleid][cLocationy],CarInfo[vehicleid][cLocationz]);
    return 1;
}
The SetVehiclePos works good but the Angle is not changing,i heard that there is a unsynced problem,is that true? Thanks.
Reply
#2

Try setting the angle after setting the position.
Reply
#3

Quote:
Originally Posted by _Xerxes_
Try setting the angle after setting the position.
Already did,didn't work :[
Reply
#4

Your not the only one with the problem.

Angle with create vehicles is fine, but this SetVehicleZAngle seems to want to be 0 all the time...

I am investigating as there sections of this script I am working on where it works fine.

It seems it WILL use the SetVehicleZAngle is someone is in it...

so put a player in them send them back to orignal spot, maybe a bot can do it
Reply
#5

Have this problem too.
Reply
#6

According to Kye, SetVehicleZAngle is suppose to set the X and Y to 0....many have reported this as a bug, but we have been told that's the normal behavior.

[edit] my bad if your talking about its not setting the Z angle, then yes I don't believe that would work without the Vehicle occupied due to the Vehicle streamer.
Reply
#7

just recreate the car like i did

Код:
public OnVehicleSpawn(vehicleid)
{
  
 	  DestroyVehicle(vehicleid);
 	  vehicleid = AddStaticVehicleEx(CarInfo[vehicleid][cModel],CarInfo[vehicleid][cLocationx], CarInfo[vehicleid][cLocationy], CarInfo[vehicleid][cLocationz], CarInfo[vehicleid][cAngle], CarInfo[vehicleid][cColorOne], CarInfo[vehicleid][cColorTwo], 60000);
		CarInfo[vehicleid][cSQLID] = vehicleid;
		ChangeVehicleColor(vehicleid, CarInfo[vehicleid][cColorOne], CarInfo[vehicleid][cColorTwo]);
 
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)