PHP Code:
CMD:siren(playerid, params[])
{
new model = GetVehicleModel(vehicle);
if(!IsLawEnforcement(playerid)) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction.");
if(!IsDriver(playerid)) return SCM(playerid, COLOR_GREY, "You must be the driver.");
{
if(model != 560 && model != 541 && model != 525 && model != 426 && model != 579) return SCM(playerid, COLOR_GREY, "The siren is compatible only for Sultan/Bullet/Towtruck/Premier/Huntley.");
if(!IsDriver(playerid)) return SCM(playerid, COLOR_GREY, "You must be the driver.");
if(Siren[vehicle] == 0)
{
SCM(playerid, COLOR_WHITE, "Siren attached.");
if(model == 560)
{
Siren[vehicle] = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 300.0);
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle, 0.225000,0.750000,0.449999, 0.000000, 0.000000, 0.000000);
}
if(model == 541)
{
Siren[vehicle] = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 300.0);
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle, 0.375000,0.524999,0.375000, 0.000000, 0.000000, 0.000000);
}
if(model == 426)
{
Siren[vehicle] = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 300.0);
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle, 0.524999,0.749999, 0.375000, 0.000000, 0.000000, 0.000000);
}
if(model == 525)
{
Siren[vehicle] = CreateDynamicObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 300.0);
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle, 0.0, -0.485, 1.36, 0.000000, 0.000000, 180.0);
}
if(model == 579)
{
Siren[vehicle] = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 300.0);
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle, 0.679999, 0.479999, 0.734999, 0.000000, 0.000000, 0.000000);
}
}
else
{
SCM(playerid, COLOR_WHITE, "Siren detached.");
DestroyDynamicObject(Siren[vehicle]);
Siren[vehicle] = 0;
}
}
{
if(model != 490) return SCM(playerid, COLOR_GREY, "The siren is compatible only for Rancher.");
if(!IsDriver(playerid)) return SCM(playerid, COLOR_GREY, "You must be the driver.");
if(Siren[vehicle] == 0)
{
SCM(playerid, COLOR_WHITE, "Siren attached.");
Siren[vehicle] = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 300.0);
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle, 0.654999, 1.149999, 0.594999, 0.000000, 0.000000, 0.000000);
}
else
{
SCM(playerid, COLOR_WHITE, "Siren detached.");
DestroyDynamicObject(Siren[vehicle]);
Siren[vehicle] = 0;
}
}
return 1;
}
CMD:siren2(playerid, params[])
{
new model = GetVehicleModel(vehicle);
if(!IsLawEnforcement(playerid)) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction.");
if(model != 560 && model != 426) return SCM(playerid, COLOR_GREY, "The siren is compatible only for Sultan/Premier.");
if(!IsDriver(playerid)) return SCM(playerid, COLOR_GREY, "You must be the driver.");
if(Siren2[vehicle] == 0)
{
SCM(playerid, COLOR_WHITE, "Siren attached.");
if(model == 560)
{
Siren2[vehicle] = CreateDynamicObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 300.0);
AttachDynamicObjectToVehicle(Siren2[vehicle], vehicle, 0.000000, -1.289999, 0.394999, 0.000000, 0.000000, 0.000000);
}
if(model == 426)
{
Siren2[vehicle] = CreateDynamicObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 300.0);
AttachDynamicObjectToVehicle(Siren2[vehicle], vehicle, 0.000000, -1.669998, 0.349999, 0.000000, 0.000000, 0.000000);
}
}
else
{
SCM(playerid, COLOR_WHITE, "Siren detached.");
DestroyDynamicObject(Siren2[vehicle]);
Siren2[vehicle] = 0;
}
return 1;
}
It's resulting in this: