SA-MP Forums Archive
Vehicle Angle help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Angle help (/showthread.php?tid=579670)



Vehicle Angle help - AlexBlack - 29.06.2015

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;




Re: Vehicle Angle help - NiGHTM4RE714 - 29.06.2015

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



Re : Vehicle Angle help - AlexBlack - 29.06.2015

didn't work.


Re: Vehicle Angle help - jamesbond007 - 29.06.2015

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


Re: Re : Vehicle Angle help - NiGHTM4RE714 - 29.06.2015

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


Re : Vehicle Angle help - AlexBlack - 29.06.2015

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 )


Re: Vehicle Angle help - mamorunl - 29.06.2015

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