Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

tp player in front of vehicle instead of vehicle in front of player.

$
0
0
I am creating something that if the player drives above a certain about of speed he gets flown out of the window like in GTAiv etc. This is unpossible to to with an animation i think, so i want to tp the player in front of the vehicle.
I know it is possible to do it with vehicles...

But is it also possible to revert that? so simply eject the player from the car and put them in front of the vehicle.
How would i put the player in front of the vehicle.

I think something with the player facing angle?

This is what i have now but i cant figure out how i should set the player in front of the vehicle with setplayerpos or setplayerfacingangle.

PHP Code:

GetPlayerPos(playeridPlayerXPlayerYPlayerZ);
RemovePlayerFromVehicle(playerid);
GetPlayerFacingAngle(playeridFloat:Angle); 

Edit: is there also a way to make the car window break like if you shoot on it?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>