Adauga la inceput asta:
new // Police Department Vehicle Objects
SirenaPD[MAX_VEHICLES],
pd_car_obj_a,
pd_car_obj_b,
pd_car_obj_c,
pd_car_obj_d,
pd_car_obj_e,
pd_car_obj_f;
Cauta primary key de la fiecare masina de politie si inlocuieste-le in codul asta:
if((newkeys & KEY_CROUCH)&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) {
new this_vehicle_id = GetPlayerVehicleID(playerid);
if(this_vehicle_id == policecar[12])
{
if(SirenaPD[policecar[12]] == 0) {
SirenaPD[policecar[12]] = 1;
DestroyObject(pd_car_obj_e);
pd_car_obj_e = CreateObject(19419, 0, 0, 0, 0, 0, 0, 1000);
AttachObjectToVehicle(pd_car_obj_c, policecar[12], -0.015000, -0.000000, 0.709999, 0.000000, 0.000000, 0.000000);
}
else
{
SirenaPD[policecar[12]] = 0;
DestroyObject(pd_car_obj_c);
pd_car_obj_c = CreateObject(19420, 0, 0, 0, 0, 0, 0, 1000);
AttachObjectToVehicle(pd_car_obj_e, policecar[12], -0.015000, -0.000000, 0.709999, 0.000000, 0.000000, 0.000000);
}
}
else if(this_vehicle_id == policecar[13])
{
if(SirenaPD[policecar[13]] == 0) {
SirenaPD[policecar[13]] = 1;
DestroyObject(pd_car_obj_f);
pd_car_obj_f = CreateObject(19419, 0, 0, 0, 0, 0, 0, 1000);
AttachObjectToVehicle(pd_car_obj_d, policecar[13], -0.015000, -0.000000, 0.709999, 0.000000, 0.000000, 0.000000);
}
else
{
SirenaPD[policecar[13]] = 0;
DestroyObject(pd_car_obj_d);
pd_car_obj_d = CreateObject(19420, 0, 0, 0, 0, 0, 0, 1000);
AttachObjectToVehicle(pd_car_obj_f, policecar[13], -0.015000, -0.000000, 0.709999, 0.000000, 0.000000, 0.000000);
}
}
}
Apoi asta:
pd_car_obj_a = CreateObject(2659, 0, 0, 0, 0, 0, 0, 1000);
pd_car_obj_b = CreateObject(2659, 0, 0, 0, 0, 0, 0, 1000);
pd_car_obj_c = CreateObject(19419, 0, 0, 0, 0, 0, 0, 1000);
pd_car_obj_d = CreateObject(19419, 0, 0, 0, 0, 0, 0, 1000);
pd_car_obj_e = CreateObject(19420, 0, 0, 0, 0, 0, 0, 1000);
pd_car_obj_f = CreateObject(19420, 0, 0, 0, 0, 0, 0, 1000);
SetObjectMaterialText(pd_car_obj_a, "{000000}POLICE", 0, 40, "Bold", 33, 1, 0xFFFFFFAA, 0, 1);
SetObjectMaterialText(pd_car_obj_b, "{000000}POLICE", 0, 40, "Bold", 33, 1, 0xFFFFFFAA, 0, 1);
AttachObjectToVehicle(pd_car_obj_a, policecar[12], 0.000000, -1.929998, 0.259999, -85.424964, 0.000000, 0.000000);
AttachObjectToVehicle(pd_car_obj_b, policecar[13], 0.000000, -1.929998, 0.259999, -85.424964, 0.000000, 0.000000);
AttachObjectToVehicle(pd_car_obj_e, policecar[12], -0.015000, -0.000000, 0.709999, 0.000000, 0.000000, 0.000000);
AttachObjectToVehicle(pd_car_obj_f, policecar[13], -0.015000, -0.000000, 0.709999, 0.000000, 0.000000, 0.000000);
Acum pentru taxi, adauga asta:
new // Taxi Cab Company Vehicle Objects
taxi_car_obj_a,
taxi_car_obj_b;
Apoi asta:
taxi_car_obj_a = CreateObject(19308, 0.00, -0.22, 0.93, 0.00, 0.00, 0.00);
taxi_car_obj_b = CreateObject(19308, 0.00, -0.22, 0.93, 0.00, 0.00, 0.00);
AttachObjectToVehicle(taxi_car_obj_a, taxicar[19], 0.00, -0.22, 0.93, 0.00, 0.00, 0.00);
AttachObjectToVehicle(taxi_car_obj_b, taxicar[20], 0.00, -0.22, 0.93, 0.00, 0.00, 0.00);
Nu stiu daca am omis ceva, da cred ca din tot codul asta il poti rescrie tu in asa fel incat sa functioneze.
Nu e facut de mine, l-am extras din alt GM.