Freeze vehicles - custom mappings.
#1

What I'm searching for is how to freeze a vehicle, not just freezing it but also unfreezing at the right moment.

Basically the vehicles are on the ground of an mapping (blue/air under the mapping).
When a player gets close to any mapping it loads it but then vehicles loads as well and fall through before the mapping is loaded, now they will re-spawn and get next to the mapping (on the road). If it was an interior in the air it will fall all the way down.

I'm just confused, because freezing the vehicles will be annoying for other people, and if its only person directed it will be weird when a player is driving a freeze'd vehicle. (If even possible).
Reply
#2

SetVehicleParamsEx? Not sure if you mean that or something else lol. See also TogglePlayerControllable.
Reply
#3

No, well you really need to see it.
I hope you understand what I mean by the following.

Imagine;
You made a mapping in the air and placed vehicle's on the mapped floor. (Street or what-so-ever)
The vehicle's will spawn somewhat before the mapping does. (Appearently) and fells throught the ground (mapping).
So what I want is the mappings to load first, best option; freezing the vehicle. but then you get the issue with multiple people and stuff.

Note: vehicles are database-wisely and will spawn at those points (on the mappings) after being destroyed. Then it falls through the mapping again.
Reply
#4

Anyone have a solution to this?
Reply
#5

Not sure if it'll work or not but here's my idea.

Create a variable with name "FrozenCar[MAX_PLAYERS]" and then store the vehicle ID which you'd like up there in the variable and then:

Код:
OnPlayerUpdate(playerid)
{
    if(FrozenCar[playerid] && GetPlayerVehicleID[playerid] == FrozenCar[playerid])
    {
        SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z)
    }
}
Set the variable value equal to ZERO whenever you feel like unfreezing it.
Reply
#6

The best solution for you is:

Create floors(objects where cars respawn) with CreateObject, not Dynamic
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)