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