Most fürkésztem ki ezt egy tankolós scriptbõl hátha hasznát veszed:
[pawn]public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newkeys & KEY_ACTION)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 1) SetVehicleParamsEx(vehicleid,0,lights,alarm,doors,bonnet,boot,objective);
else
{
if(VehicleFuel[vehicleid] > 0) SetVehicleParamsEx(vehicleid,1,lights,alarm,doors,bonnet,boot,objective);
}
}
if(newkeys & KEY_CROUCH)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(lights == 1) SetVehicleParamsEx(vehicleid,engine,0,alarm,doors,bonnet,boot,objective);
else SetVehicleParamsEx(vehicleid,engine,1,alarm,doors,bonnet,boot,objective);
}
}
return 1;
}[/pawn]