Vehicle Freeze
#1

Is there a quicker way to stop a vehicle?

This is what I've got atm:

Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(pcheckpointTrucker[playerid] == 1)
    {
        new i;
        DisablePlayerCheckpoint(playerid);
        GetVehicleParamsEx(GetPlayerVehicleID(i), engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(GetPlayerVehicleID(i), 0, lights, alarm, doors, bonnet, boot, objective);
        SendClientMessage(playerid, COLOR_LIGHTGREEN, "Unload the crate and store it inside the garage.");
    }
}
Reply
#2

Get vehicle's pos and set it

PHP код:
new Float:xFloat:yFloat:z;
GetVehiclePos(vehicleidxyz);
SetVehiclePos(vehicleidxyz); 
also why did you do this: ?

PHP код:
new i//sets to 0 (you'r not looping it) and theres no need for loop
GetVehicleParamsEx(GetPlayerVehicleID(i), enginelightsalarmdoorsbonnetbootobjective);
SetVehicleParamsEx(GetPlayerVehicleID(i), 0lightsalarmdoorsbonnetbootobjective); 
that will allways set player id 0 vehicle params

you should do this:

PHP код:
GetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnetbootobjective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0lightsalarmdoorsbonnetbootobjective); 
Reply
#3

The best to do is set the vehicle's velocity to zero frequently.
Reply
#4

shutting down players vehicle isnt doesnt even stop vehicle.
just use setvehiclepos because it zeros players vehicle speed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)