Guten Morgen,
Mein Problem ist ich mache /sirene und es kommt einfach nichts kann mir da jemand weiterhelfen?
Code
if (strcmp(cmd, "/sirene", true) == 0){
if(PlayerInfo[playerid][Team] == 18 || PlayerInfo[playerid][Team] == 14|| PlayerInfo[playerid][Team] == 11|| PlayerInfo[playerid][Team] == 19|| PlayerInfo[playerid][Team] == 6){
if(VehicleSystem[GetPlayerVehicleID(playerid)][fraktion] == 18 || VehicleSystem[GetPlayerVehicleID(playerid)][fraktion] == 6 || VehicleSystem[GetPlayerVehicleID(playerid)][fraktion] == 19 || VehicleSystem[GetPlayerVehicleID(playerid)][fraktion] == 14 || VehicleSystem[GetPlayerVehicleID(playerid)][fraktion] == 11){
if(VehicleSystem[GetPlayerVehicleID(playerid)][sir1] != 0){
DestroyObject(VehicleSystem[GetPlayerVehicleID(playerid)][sir1]);
VehicleSystem[GetPlayerVehicleID(playerid)][sir1] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Die Sirene wurde entfernt.");
return 1;
}
if(AttachSirene(GetPlayerVehicleID(playerid))){
SendClientMessage(playerid, COLOR_GREEN, "Sirene ist drauf. Du kannst sie mit /sirene wieder wegmachen");
}
else{
SendClientMessage(playerid, COLOR_RED, "Für dieses Fahrzeug ist keine Sirene verfügbar.");
}
}
else{
SendClientMessage(playerid, COLOR_RED, "Geht nur bei FBI,San Andreas Emergency Department,SeSe,Polizei Fahrzeugen");
}
}
return 1;
forward AttachSirene(vehicleID);
public AttachSirene(vehicleID){
new model = GetVehicleModel(vehicleID);
if(model == 560){ //Sultan
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000, 0.119999, 0.820000, 0.000000, 0.000000, 0.000000);
return 1;
}
else if(model == 490){ //FBI-Ranger
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,0.599999,1.095000,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 426){ //Premier
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,0.000000,0.829999,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 415){ //Cheetah
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,-0.355000,0.604999,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 402){ //Buffalo
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,-0.300000,0.759999,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 422){ //Bobcat
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,0.000000,0.799999,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 470){ //Patriot
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,0.150000,1.084999,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 433){ //Barracks
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,1.210000,1.690000,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 409){ //Limo
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,0.815000,0.829999,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 552){ //Utility Van
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,0.674999,1.330000,0.000000,0.000000,0.000000);
return 1;
}
else if(model == 525){ //Abschlepper
VehicleSystem[vehicleID][sir1] = CreateObject(19620, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(VehicleSystem[vehicleID][sir1], vehicleID, 0.000000,0.674999,1.330000,0.000000,0.000000,0.000000);
return 1;
}
return 0;
}
Alles anzeigen