Hallo,
das Licht geht nicht an aber der Motor.
Habe Motor in einem Befehl geschrieben und Licht auch also einzeln.
Licht Befehl:
ocmd:licht(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
if(Licht == 0)
{
new veh = GetPlayerVehicleID(playerid);
new engine,light,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(veh,engine,light,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
Licht = 1;
GameTextForPlayer(playerid,"~w~Licht~n~~g~An",3000,4);
}
else if(Licht == 1)
{
new veh = GetPlayerVehicleID(playerid);
new engine,light,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(veh,engine,light,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
Licht = 0;
GameTextForPlayer(playerid,"~w~Licht~n~~r~Aus",3000,4);
}
}
else
{
}
return 1;
}
Oben im Script:
new Licht;
MfG