[Include] freezeVehicle and UnfreezeVehicle
#1

Functions:
Код:
UnfreezeVehicle
freezeVehicle
bool:isVehicleFreezed

This was realy easy to make!


Work time:80 minutes
Download link:Pastebin
Reply
#2

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)
Reply
#3

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.
Reply
#4

I'd say bad method, not really a good idea and style of scripting. things you could improve is listed below.
  • You could use SetVehicleVelocity and a boolean variable to check if the variable is set to true or false.
  • Why create this function if there is TogglePlayerControllable already?
  • Why the earth would you freeze a vehicle?
Reply
#5

Idk...This is from my old GM.
Reply
#6

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

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
Reply
#8

I did not say that it is a bug
Reply
#9

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?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)