18.05.2012, 19:06
how can i put a siren on burrito(id 482) or (sultan 560) like this.
http://www.youtube.com/watch?feature...&v=y5_xbQ_ObbE
http://www.youtube.com/watch?feature...&v=y5_xbQ_ObbE
COMMAND:siren(playerid,params[])
{
new 1siren = CreateObject(18646,0,0,0,0,0,0);
new 2siren = CreateObject(18646,0,0,0,0,0,0);
AttachObjectToVehicle(1siren, GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(2siren, GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
return 1;
}
#define MAX_VEHICLES selectmaxvehicles
enum VehiclesProperties {
UsingSiren,
Siren1,
Siren2
}
new VehicleInfo[MAX_VEHICLES][VehicleProperties];
COMMAND:siren(playerid,params[])
{
new vehicle = GetPlayerVehicleID(playerid);
VehicleInfo[vehicleid][Siren1] = CreateObject(18646,0,0,0,0,0,0);
VehicleInfo[vehicleid][Siren2] = CreateObject(18646,0,0,0,0,0,0);
if(VehicleInfo[vehicle][UsingSiren] == 0)
{
AttachObjectToVehicle(VehicleInfo[vehicleid][Siren1], GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(VehicleInfo[vehicleid][Siren2], GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
VehicleInfo[vehicle][UsingSiren] = 1;
}
else
{
DestroyObject(VehicleInfo[vehicleid][Siren1]);
DestroyObject(VehicleInfo[vehicleid][Siren2]);
VehicleInfo[vehicle][UsingSiren] = 0;
}
}