SA-MP Forums Archive
Frozen Car - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Frozen Car (/showthread.php?tid=576282)



Frozen Car - Thoper - 02.06.2015

How do the vehicle will be frozen as it would be impossible to drive it even if driving the vehicle?
Thanks for the help.


Re: Frozen Car - Alpay0098 - 02.06.2015

Just freeze the driver using https://sampwiki.blast.hk/wiki/Function:...erControllable.
And his vehicle will be frozen when you do this.
or you can SetVehicleParamsEx it to turn it's engine off.


Re: Frozen Car - gurmani11 - 02.06.2015

Vehicleutil.pwn is present in
/samp037_svr_R1_win32/includes/vehicleutil.pwn
open it you will see stocks


SetVehicleEngineState(vid, setstate)

pawn Код:
#include "../include/vehicleutil.inc"

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SetVehicleEngineState(vehicleid, 1)// 1 to turn on // either no need tho
    return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
    SetVehicleEngineState(vehicleid, 0)// 0 to turn off // either no need tho
    return 1;
}
and many more..