How to detect if a player is under a vehicle?
#1

I want to punish those who kill by parking a car over you.

A made something with OnPlayerDeath but it's useless if a player who parks the vehicle exit's...

So i need something different.. i need to detect if a player is under a vehicle...

Does anyone know how to do this? Thank you.
Reply
#2

I read it wrong, sorry
Reply
#3

maybe use GetPlayerAnimation?
Reply
#4

Use these functions:

GetPlayerAnimationIndex(playerid)
GetVehivlePos
IsPlayerInRangeOfPoint

If the player animation index is 1126 and he is in the range of position of some car, he's under a vehicle.
It's not 100% accurately
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)