05.06.2014, 21:05
When i lock my vehicle, and do respawn on him (example park him and respawn), te doors are unlocked when the vehicle spawned... Please help
Код:
public OnVehicleSpawn(vehicleid) { new engine, lights, alarm, doors, bonnet, boot, objective; if(IsAOwnedVehicle(vehicleid)) { SetVehicleComponents(vehicleid); GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); if(VehicleInfo[vehicleid][vLocked] == 1) SetVehicleParamsEx(vehicleid, 0, 0, alarm, 1, bonnet, boot, objective); else SetVehicleParamsEx(vehicleid, 0, 0, alarm, 0, bonnet, boot, objective); ChangeVehicleColor(vehicleid, VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2]); vEngine[vehicleid] = 0; } else { GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, objective); vEngine[vehicleid] = 0; } return 1; }