SA-MP Forums Archive
[Include] freezeVehicle and UnfreezeVehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] freezeVehicle and UnfreezeVehicle (/showthread.php?tid=487884)



freezeVehicle and UnfreezeVehicle - boomerboom - 15.01.2014

Functions:
Код:
UnfreezeVehicle
freezeVehicle
bool:isVehicleFreezed

This was realy easy to make!


Work time:80 minutes
Download link:Pastebin


Re: freezeVehicle and UnfreezeVehicle - Biesmen - 15.01.2014

Pretty simple script indeed, but why are you trying to make it look so complicated?
pawn Код:
v__
BB(::)TIMER_()
(0.000)

#define BB(::) \
                    BB__
etc

Just wondering!

Btw, turning off the vehicle's engine also freezes the vehicle (however, it doesn't if the car gets pushed by an other car or player)


Re: freezeVehicle and UnfreezeVehicle - boomerboom - 15.01.2014

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
Pretty simple script indeed, but why are you trying to make it look so complicated?
pawn Код:
v__
BB(::)TIMER_()
(0.000)

#define BB(::) \
                    BB__
etc

Just wondering!

Btw, turning off the vehicle's engine also freezes the vehicle (however, it doesn't if the car gets pushed by an other car or player)
Yes it does.But the include doesn't got any bugs.


Re: freezeVehicle and UnfreezeVehicle - Patrick - 15.01.2014

I'd say bad method, not really a good idea and style of scripting. things you could improve is listed below.



Re: freezeVehicle and UnfreezeVehicle - boomerboom - 15.01.2014

Idk...This is from my old GM.


Re: freezeVehicle and UnfreezeVehicle - iJumbo - 15.01.2014

Will this make the vehicle laggy?.. i mean this 200 ms the veh will fall and teleport to old position


Re: freezeVehicle and UnfreezeVehicle - boomerboom - 16.01.2014

Quote:
Originally Posted by iJumbo
Посмотреть сообщение
Will this make the vehicle laggy?.. i mean this 200 ms the veh will fall and teleport to old position

I dont think it will...As I said before it doesnt have any bug


Re: freezeVehicle and UnfreezeVehicle - iJumbo - 16.01.2014

I did not say that it is a bug


Re: freezeVehicle and UnfreezeVehicle - sammp - 17.01.2014

So is the purpose of this to be used when a player is outside a vehicle? If it isn't this is pointless, as:

pawn Код:
new bool:IsVehicleFrozen[MAX_VEHICLES];
   
    stock FreezeVehicle(vehicleid)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            TogglePlayerControllable(playerid, false);
            IsVehicleFrozen[GetPlayerVehicleID(playerid)] = true;
            return true; // dont need to do this, but put it out there for the sake of it.
        }
        else return false; // you dont even need to do this either
       
    }
does the same thing i believe. If it isn't it's a much easier method anyways


@pdsk2012

I have no idea, but if this is some sort of method to stop a player driving a vehicle, they can quite simply set a variable to check if the vehicle is enter-able, then if yes let him in, else chuck him out.

Also like you said, why the f**k would you wanna freeze a vehicle?


Re: freezeVehicle and UnfreezeVehicle - Abagail - 17.01.2014

Just a tip, no hate replies please:
Don't post an include if your not gonna explain what functions/features it has in-depth. Also, try to include just more information generally than basically Download this. Also, try to provide some screen-shots please.