Vehicle JumpFunction
#1

Hi im trying to make VehicleJumpFunction
And this is how im doing it But i dont know how exactly to do it so i need help
pawn Код:
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(currentveh, vehx, vehy, vehz);
SetVehiclePos(currentveh, vehx, +50, vehz);
I want the vehicle to go up but i dont know how to do it?

Ok i found the problem it was simple
i just needed to add vehy+15 so it works but that would make it go backwards not UP
So i added +15 to vehz and then it was vehz+15 and i changed the +50 to vehy
And it works perfectly

So the working Code is
pawn Код:
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(currentveh, vehx, vehy, vehz);
SetVehiclePos(currentveh, vehx, vehy, vehz+15);
Reply
#2

Simply increase the z position by how far you want them to go into the sky.

pawn Код:
new currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(currentveh, vehx, vehy, vehz);
SetVehiclePos(currentveh, vehx, vehy, vehz + 50);
Reply
#3

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Simply increase the z position by how far you want them to go into the sky.

pawn Код:
new currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(currentveh, vehx, vehy, vehz);
SetVehiclePos(currentveh, vehx, vehy, vehz + 50);
Oll kool thanks i figured it out two but still thanks dude
Reply
#4

You know if you want a real vehicle jump and not one that teleports you, you should use these two functions. (its the same logic increase z)

https://sampwiki.blast.hk/wiki/GetVehicleVelocity
https://sampwiki.blast.hk/wiki/SetVehicleVelocity
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)