Oben: new bool:licht[MAX_VEHICLES];
bei OnPlayerKeyStateChange:
if(newkeys & KEY_CROUCH)
{
if(IsPlayerInAnyVehicle(playerid))
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
if(licht[vid] == false)
{
GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
licht[vid] = true;
}
else if(licht[vid] == true)
{
GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
licht[vid] = false;
}
}
}