SA-MP Forums Archive
Check if a player has crashed with an object. - 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: Check if a player has crashed with an object. (/showthread.php?tid=403119)



Check if a player has crashed with an object. - Magic_Time - 29.12.2012

How to check if a player has crashed with an object? Let's say buildings, walls etc..


Re: Check if a player has crashed with an object. - Threshold - 29.12.2012

You can only really check if a player has disconnected because of a timeout, you can't detect whether they have been disconnected because of an object or opcode.

https://sampwiki.blast.hk/wiki/OnPlayerDisconnect


Re: Check if a player has crashed with an object. - Magic_Time - 29.12.2012

This is a misunderstand.
I meant.
When a player is going at 100km/h and he collides with a wall, object.
How to check it?
Thanks in advance


Re: Check if a player has crashed with an object. - Magic_Time - 30.12.2012

Can someone help me please?


Re: Check if a player has crashed with an object. - LarzI - 30.12.2012

Get a player's speed then check if it suddenly decreases a lot (near 0) - using e.g. OnPlayerUpdate and GetPlayerVelocity