Hallo Community. Ich habe es soweit gescriptet, blos ich weiss nicht wie ich Abrage ob sie an/aus ist.
if(strcmp(cmdtext,"/sirene",true) == 0)
{
if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
new vehid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehid) == 560 && sfl1[vehid] == 0) // Sultan
{
sfl1[vehid] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl2[vehid] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl3[vehid] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl4[vehid] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl5[vehid] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl1[vehid],vehid,-0.365000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl2[vehid],vehid,0.405000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl3[vehid],vehid,0.270000,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl4[vehid],vehid,-0.304999,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl5[vehid],vehid,-0.589999,-0.069999,0.869999,0.000000,0.000000,0.000000);
SendClientMessage(playerid,"Du hast die Sirene eingeschalten!");
}
if(GetVehicleModel(vehid) == 541 && sfl1[vehid] == 0) // Bullet
{
sfl1[vehid] = CreateObject(19419,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl1[vehid], vehid, -0.000000, -0.704999, 0.544999, 0.000000, 0.000000, 0.000000); //Object Model: 19420 |
SendClientMessage(playerid,"Du hast die Sirene eingeschalten!");
}
if(GetVehicleModel(vehid) == 451 && sfl1[vehid] == 0) // Turismo
{
sfl1[vehid] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl2[vehid] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl3[vehid] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl4[vehid] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl5[vehid] = CreateObject(19419,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl1[vehid],vehid,-0.000000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl2[vehid],vehid,0.000000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl3[vehid],vehid,0.000000,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl4[vehid],vehid,-0.000000,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl5[vehid], vehid, -0.000000, -0.704999, 0.544999, 0.000000, 0.000000, 0.000000);
SendClientMessage(playerid,"Du hast die Sirene eingeschalten!");
}
else
{
DestroyObject(sfl1[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl2[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl3[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl4[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl5[GetPlayerVehicleID(playerid)]);
sfl1[GetPlayerVehicleID(playerid)] = 0;
sfl2[GetPlayerVehicleID(playerid)] = 0;
sfl3[GetPlayerVehicleID(playerid)] = 0;
sfl4[GetPlayerVehicleID(playerid)] = 0;
sfl5[GetPlayerVehicleID(playerid)] = 0;
SendClientMessage(playerid,"Du hast die Sirene ausgeschalten!");
return 1;
}
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist kein Beamter" );
}
return 1;
}