28.01.2014, 17:15
I need a function that destroy vehicle like "DestroyVehicle(playerid);", I'v tried some functions like:"
But its destroy vehicles which are not occupation , please help i want code thats when player death destroy his car, and when exit from server and when exit from vehicle thanks !
Code:
for(new i;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { if(IsPlayerInVehicle(i, vehid)) return 1; } }
Code:
public OnPlayerDisconnect(playerid, reason) { //AnyFunction Destroy the playerid vehicle when he leave if he was on vehicle. return 1; } OnPlayerExitVehicle(p...) { //Send timer to destroy his vehicle if he not back with 1 min return 1; } OnPlayerDeath { //Destroy playerid vehicle }