[REQUEST] New Function... [READ]
#2

This should do the trick:
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;
}
Not sure why you want to set the position and the angle though.
Reply


Messages In This Thread
[REQUEST] New Function... [READ] - by English-Conceptz - 07.12.2011, 10:14
Re: [REQUEST] New Function... [READ] - by RyDeR` - 07.12.2011, 10:52
Re: [REQUEST] New Function... [READ] - by English-Conceptz - 07.12.2011, 11:11
Re: [REQUEST] New Function... [READ] - by kurta999 - 07.12.2011, 11:32
Re: [REQUEST] New Function... [READ] - by leong124 - 07.12.2011, 11:58
Re: [REQUEST] New Function... [READ] - by cessil - 07.12.2011, 12:56
Re: [REQUEST] New Function... [READ] - by English-Conceptz - 07.12.2011, 13:03
Re: [REQUEST] New Function... [READ] - by English-Conceptz - 07.12.2011, 13:09
Re: [REQUEST] New Function... [READ] - by English-Conceptz - 07.12.2011, 15:27
Re: [REQUEST] New Function... [READ] - by English-Conceptz - 07.12.2011, 16:42

Forum Jump:


Users browsing this thread: 2 Guest(s)