07.12.2011, 10:52
This should do the trick:
Not sure why you want to set the position and the angle though.
pawn Код:
stock FreezeVehicle(const iVehID, const Float: fX, const Float: fY, const Float: fZ, const Float: fA) {
if(SetVehiclePos(iVehID, fX, fY, fZ)) {
SetVehicleZAngle(iVehID, fA);
new
iParams[6]
;
GetVehicleParamsEx(iVehID, iParams[0], iParams[0], iParams[1], iParams[2], iParams[3], iParams[4], iParams[5]);
SetVehicleParamsEx(iVehID, false, iParams[0], iParams[1], iParams[2], iParams[3], iParams[4], iParams[5]);
return iVehID;
}
return INVALID_VEHICLE_ID;
}
pawn Код:
stock UnfreezeVehicle(const iVehID) {
new
iParams[6]
;
if(GetVehicleParamsEx(iVehID, iParams[0], iParams[0], iParams[1], iParams[2], iParams[3], iParams[4], iParams[5])) {
SetVehicleParamsEx(iVehID, true, iParams[0], iParams[1], iParams[2], iParams[3], iParams[4], iParams[5]);
return iVehID;
}
return INVALID_VEHICLE_ID;
}