detect player colliion into a vehicle
#1

how would I detect a player collision into a vehicle
Reply
#2

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
Reply
#3

how would I empliment that into a code that's check for unoccupied makes a damage then set the alarm off ?? any ideas
Reply
#4

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
Reply
#5

you sir are a leg end !!!! legend Rep +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)