05.10.2016, 16:32
As I can get the collision of a vehicle according to its speed? for example: I want to make a script that, if you collide at high speed leaves you trapped in the vehicle. Sorry for my bad English
// above your script new last_vehicle[MAX_PLAYERS]; // OnPlayerStateChange if(newstate == PLAYER_STATE_DRIVER) { last_vehicle[playerid] = GetPlayerVehicleID(playerid); } if(oldstate == PLAYER_STATE_DRIVER) { PutPlayerInVehicle(playerid, last_vehicle[playerid], 0); }
You should take a look at Emmet_'s OnPlayerCrashVehicle include. I don't know if it uses the best method, but it works pretty well. And I believe the "extra include" include might be Emmet_'s include which has this function inside of it aswell.Give Link Below