Habs ja auch schon gelöst, ABER mein problem ist noch das ich
wenn ich /uclight oder /sirene eingib das vertauscht wird.
( /uclight = Sie haben die SIRENE angebracht /// /sirene = Sie haben das Undercover lblvalb la angebracht ... )
Was da los ?
Sirene
if(strcmp(cmd, "/sirene", true))
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
if(GetVehicleModel(tmpcar) == 411)
{
if(SIE1[GetPlayerVehicleID(playerid)] == 0)//infernus
{
sirene1[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000,-0.075000,0.674999,0.000000,0.000000,0.000000);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben die Sirene angebracht (zum Entfernen erneut: /sirene)");
SIE1[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(SIE1[GetPlayerVehicleID(playerid)] == 1)
{
DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben die Sirene abgenommen.");
SIE1[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}
else if(GetVehicleModel(tmpcar) == 560)//sultan
{
if(SIE2[GetPlayerVehicleID(playerid)] == 0)
{
sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,-1000,0,0,0,100);
//AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000,-0.075000,0.674999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000, 0.000000, 0.834999, 0.000000, 0.000000, 0.000000); //Object Model: 19419 | Fette Sirene Sultan
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben die Sirene angebracht (zum Entfernen erneut: /sirene)");
SIE2[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(SIE2[GetPlayerVehicleID(playerid)] == 1)
{
DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben die Sirene abgenommen.");
SIE2[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Du bist kein Polizist.");
return 1;
}
}
return 1;
}
Uclight
if(strcmp(cmd, "/uclight", true))
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
if(GetVehicleModel(tmpcar) == 411)
{
if(UCL1[GetPlayerVehicleID(playerid)] == 0)
{
uclight1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(uclight1[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000,-0.075000,0.674999,0.000000,0.000000,0.000000);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben die Sirene angebracht (zum Entfernen erneut: /uclight)");
UCL1[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(UCL1[GetPlayerVehicleID(playerid)] == 1)
{
DestroyObject(uclight1[GetPlayerVehicleID(playerid)]);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben die Sirene abgenommen.");
UCL1[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}
else if(GetVehicleModel(tmpcar) == 560)//sultan
{
if(UCL2[GetPlayerVehicleID(playerid)] == 0)
{
uclight2[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
//AttachObjectToVehicle(uclight2[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000,-0.075000,0.674999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(uclight2[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.544999, 0.000000, 0.869999, 0.000000, 0.000000, 0.000000); //Object Model: 18646 | Ucl ight Sultan
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben die Sirene angebracht (zum Entfernen erneut: /uclight)");
UCL2[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(UCL2[GetPlayerVehicleID(playerid)] == 1)
{
DestroyObject(uclight2[GetPlayerVehicleID(playerid)]);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben die Sirene abgenommen.");
UCL2[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Du bist kein Polizist.");
return 1;
}
}
return 1;
}
Hat sich JETZT endlich erledigt
if(strcmp(cmd, "/uclight", true)) Das ist falsch
if(strcmp(cmd, "/uclight", true) == 0) Das ist richtig !!! <----------
Somit hat sich das erledigt