11.10.2017, 17:05
You can do it using GetVehicleModel, but use it only if you want all bobcats to be with drug!
So here are the created variables: (just removed coche from them)
And here are the commands:
So here are the created variables: (just removed coche from them)
PHP код:
new drug1, drug2, drug3, drug4, drug5, drug6, drug7, drug8, drug9, drug10, drug11, drug12, drug13, drug14, drug15, drug16, drug17, drug18, drug19;
PHP код:
if(strcmp(cmdtext,"/cargardroga",true)==0)
{
drug1 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug2 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug3 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug4 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug5 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug6 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug7 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug8 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug9 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug10 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug11 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug12 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug13 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug14 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug15 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug16 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug17 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug18 = CreateObject(1575,0,0,-1000,0,0,0,100);
drug19 = CreateObject(1575,0,0,-1000,0,0,0,100);
for(new v = 0; v <= MAX_VEHICLES; v++)
{
if(GetVehicleModel(v) == 422)
{
AttachObjectToVehicle(drug1, v, -0.449999,-0.674999,-0.299999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug2, v, -0.449999,-0.974999,-0.299999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug3, v, -0.449999,-0.675000,-0.149999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug4, v, -0.449999,-0.974999,-0.149999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug5, v, 0.075000,-0.675000,-0.299999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug6, v, 0.599999,-0.675000,-0.299999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug7, v, 0.599999,-0.675000,-0.149999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug8, v, 0.599999,-0.974999,-0.299999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug9, v, 0.599999,-0.974999,-0.149999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug10, v, 0.075000,-0.675000,-0.149999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug11, v, 0.075000,-0.974999,-0.299999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug12, v, 0.075000,-0.974999,-0.149999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug13, v, 0.075000,-0.600000,0.000000,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug14, v, -0.449999,-0.600000,0.000000,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug15, v, 0.599999,-0.600000,0.000000,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug16, v, 0.599999,-0.899999,0.000000,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug17, v, 0.075000,-0.899999,0.000000,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug18, v, -0.449999,-0.899999,0.000000,0.000000,0.000000,0.000000);
AttachObjectToVehicle(drug19, v, -0.449999,-1.350000,-0.149999,2.700001,35.100006,0.000000);
}
}
return 1;
}
if(strcmp(cmdtext,"/descargardroga",true)==0)
{
for(new v = 0; v <= MAX_VEHICLES; v++)
{
if(GetVehicleModel(v) == 422)
{
DestroyObject(drug1);
DestroyObject(drug2);
DestroyObject(drug3);
DestroyObject(drug4);
DestroyObject(drug5);
DestroyObject(drug6);
DestroyObject(drug7);
DestroyObject(drug8);
DestroyObject(drug9);
DestroyObject(drug10);
DestroyObject(drug11);
DestroyObject(drug12);
DestroyObject(drug13);
DestroyObject(drug14);
DestroyObject(drug15);
DestroyObject(drug16);
DestroyObject(drug17);
DestroyObject(drug18);
DestroyObject(drug19);
}
}
return 1;
}