10.03.2015, 08:34
Con una variable, solo tendrнas que comprobar al desconectarse y al crear el vehнculo, ejemplo:
PHP код:
new vehiculo[MAX_PLAYERS];
public OnPlayerDisconnect(playerid, reason)
{
if(vehiculo[playerid] != 0)
{
DestroyVehicle(vehiculo[playerid]);
}
vehiculo[playerid] = 0;
return true;
}
FuncionCrearVehiculo(playerid, modelo)
{
if(vehiculo[playerid] != 0)
{
DestroyVehicle(vehiculo[playerid]);
}
vehiculo[playerid] = CreateVehicle(modelo, x, y, z, angulo, color_1, color_2, respawn_delay);
return true;
}