detect player colliion into a vehicle - 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: detect player colliion into a vehicle (
/showthread.php?tid=515975)
detect player colliion into a vehicle -
Pillhead2007 - 29.05.2014
how would I detect a player collision into a vehicle
Re: detect player colliion into a vehicle -
Threshold - 29.05.2014
There is no 100% accurate way to detect a vehicle collision. There are a few alternatives, but again, they are not always 100% accurate.
OnVehicleDamageStatusUpdate
GetVehicleHealth
These might get you started :S
Re: detect player colliion into a vehicle -
Pillhead2007 - 03.07.2014
how would I empliment that into a code that's check for unoccupied makes a damage then set the alarm off ?? any ideas
Re: detect player colliion into a vehicle -
greentarch - 03.07.2014
I never used OnUnoccupiedVehicleUpdate, but maybe try this.. ? (sorry if it doesn't work)
pawn Код:
public OnUnoccupiedVehicleUpdate( vehicleid, playerid, passenger_seat )
{
new
pKeys,
__temp__;
GetPlayerKeys( playerid, pKeys, __temp__, __temp__ );
if ( pKeys & KEY_FIRE )
{
new
vAlarm, temp[6];
GetVehicleParamsEx( vehicleid, temp[0], temp[1], vAlarm, temp[2], temp[3], temp[4], temp[5] );
SetVehicleParamsEx( vehicleid, temp[0], temp[1], true, temp[2], temp[3], temp[4], temp[5] );
}
return true;
}
My imagination says when someone press KEY_FIRE (punch, fire) it will turn vehicle alarm on
Re: detect player colliion into a vehicle -
Pillhead2007 - 04.07.2014
you sir are a leg end !!!! legend

Rep +1