Egal was ich mache etc. Mein Licht möchte einfach nicht funktionieren Motor funktioniert jedoch...
Code
ocmd:engine(playerid,params[])
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid,DUNKELROT,"Du bist nicht der Fahrer eines Fahrzeugs!");
new vID=GetPlayerVehicleID(playerid), tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective;
GetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
if(tmp_engine==1)
{
tmp_engine = 0;
}
else
{
tmp_engine = 1;
}
SetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
return 1;
}
ocmd:lights(playerid,params[])
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid,DUNKELROT,"Du bist nicht der Fahrer eines Fahrzeugs!");
new vID=GetPlayerVehicleID(playerid), tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective;
GetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
if(tmp_lights==1)
{
tmp_lights = 0;
}
else
{
tmp_lights = 1;
}
SetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
return 1;
}
Alles anzeigen