Hey, mein Lichtsystem geht irgendwie nicht.
Hier der Code
}
ocmd:licht(playerid,params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehid) == 509 || GetVehicleModel(vehid) == 481 || GetVehicleModel(vehid) == 510)
{
Licht[vehid] = false;
}
else if(Licht[vehid] == false)
{
new engines,lightss,alarms,doorss,bonnets,boots,objectives;
GetVehicleParamsEx(vehid,engines,lightss,alarms,doorss,bonnets,boots,objectives);
SetVehicleParamsEx(vehid,1,lightss,alarms,doorss,bonnets,boots,objectives);
}
else
{
new engineq,lightsq,alarmq,doorsq,bonnetq,bootq,objectiveq;
GetVehicleParamsEx(vehid,engineq,lightsq,alarmq,doorsq,bonnetq,bootq,objectiveq);
SetVehicleParamsEx(vehid,0,lightsq,alarmq,doorsq,bonnetq,bootq,objectiveq);
}
}
return 1;
}
Gruß