Vehicle Angle help
#1

hi , i have a function to put a vehicle in garage, everything is OK just the function of z Angle didn't work it's return to 0.0 angle idk why , please help , this is my code

PHP код:
stock SetPlayerCarSlotInGarage(playerid)
{
    for(new 
0MAX_PLAYERVEHICLESi++)
    {
        if(!
VData[i][vehStatus]) continue;
        if(!
isnull(VData[i][vehOwner]) && !strcmp(VData[i][vehOwner], GetName(playerid)))
        {
            if(
pInfo[playerid][pUsedVehSlot] == VData[i][vehSlot])
            {
                
LinkVehicleToInterior(VData[i][vehicleData], 1);
                
SetVehicleVirtualWorld(VData[i][vehicleData], playerid+10);
                
SetVehiclePos(VData[i][vehicleData], 616.1086, -11.25871001.5592);
                
SetVehicleZAngle(VData[i][vehicleData], -90.0);
                break;
            }
        }
    }
    return 
1;

Reply
#2

Try changing SetVehicleZAngle() to this:
PHP код:
SetVehicleZAngle(VData[i][vehicleData], 270.0); 
Reply
#3

didn't work.
Reply
#4

SetVehicleZAngle(VData[i][vehicleData], 180.0); ?
Reply
#5

Quote:
Originally Posted by AlexBlack
Посмотреть сообщение
didn't work.
Which way do you want the vehicle to be facing?
North? South? East? West?
Reply
#6

this is not the problem , i have try with all angles it's always return to 0 , with 270 / 90 / -90 .. everything i have test but it's always in the same direction ( 0.0 )
Reply
#7

What is the actual value of VData[i][vehicleData]? Does it hold a vehicle ID?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)