Guten Abend/Nacht,
wenn ich in einem San Andres Police Fahrzeug sitze und /ucl eingebe kommt nur:
[SERVER]: Du bist in keinem Fahrzeug des San Andreas Police Department!
Hier wo ich die Fahrzeuge erstelle:
public OnGameModeInit()
for(new i = 0; i < sizeof(pdInfo); i++) {
pdInfo[i][id_x] = CreateVehicle(pdInfo[i][MODELID],pdInfo[i][pd_x],pdInfo[i][pd_y],pdInfo[i][pd_z],pdInfo[i][pd_r],pdInfo[i][c1],pdInfo[i][c2],-1);
if(pdInfo[i][MODELID] == 560) {
UCLObject[pdInfo[i][id_x]][0] = CreateObject( 19420,0,0,0,0,0,0,80 );
AttachObjectToVehicle(UCLObject[pdInfo[i][id_x]][0], pdInfo[i][id_x], 0.000000, -0.200000, 0.800000, 0.000000, 0.000000, 0.000000 );
}
}
pdInfo[i][id_x] = CreateVehicle(pdInfo[i][MODELID],pdInfo[i][pd_x],pdInfo[i][pd_y],pdInfo[i][pd_z],pdInfo[i][pd_r],pdInfo[i][c1],pdInfo[i][c2],-1);
if(pdInfo[i][MODELID] == 560) {
UCLObject[pdInfo[i][id_x]][0] = CreateObject( 19420,0,0,0,0,0,0,80 );
AttachObjectToVehicle(UCLObject[pdInfo[i][id_x]][0], pdInfo[i][id_x], 0.000000, -0.200000, 0.800000, 0.000000, 0.000000, 0.000000 );
}
}
und hier der befehl:
if(strcmp(cmd, "/ucl", true) == 0) {
for(new i = 0; i < sizeof(pdInfo); i++) {
if(IsACop(playerid)) {
if(IsPlayerInAnyVehicle(playerid)) {
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
if(GetPlayerVehicleID(playerid) == pdInfo[i][id_x]) {
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560) {
if(UCL[GetPlayerVehicleID(playerid)] == 0) {
DestroyObject(UCLObject[GetPlayerVehicleID(playerid)][0]);
UCLObject[GetPlayerVehicleID(playerid)][1] = CreateObject( 19419,0,0,0,0,0,0,80 );
AttachObjectToVehicle( UCLObject[GetPlayerVehicleID(playerid)][1], GetPlayerVehicleID(playerid), 0.000000, -0.200000, 0.800000, 0.000000, 0.000000, 0.000000 ); // <iVO>
SCM(playerid,COLOR_YELLOW,"* Sirene angeschaltet.");
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
} else {
DestroyObject(UCLObject[GetPlayerVehicleID(playerid)][1]);
UCLObject[GetPlayerVehicleID(playerid)][0] = CreateObject( 19420,0,0,0,0,0,0,80 );
AttachObjectToVehicle( UCLObject[GetPlayerVehicleID(playerid)][0], GetPlayerVehicleID(playerid), 0.000000, -0.200000, 0.800000, 0.000000, 0.000000, 0.000000 ); // <iVO>
SCM(playerid,COLOR_YELLOW,"* Sirene abgeschaltet.");
UCL[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}else { SCM(playerid,COLOR_GRAD1,"[SERVER]: Du bist in keinem Zivil Fahzeug(Sultan) des San Andreas Police Department!"); return 1; }
}else { SCM(playerid,COLOR_GRAD1,"[SERVER]: Du bist in keinem Fahrzeug des San Andreas Police Department!"); return 1; }
}else { SCM(playerid, COLOR_GRAD1, "[SERVER]: Du musst der Fahrer der Fahzeuges sein um die Sirene anzuschalten!"); return 1; }
}else { SCM(playerid, COLOR_GRAD1, "[SERVER]: Du musst in einem Fahrzeug sitzen um das Sirene anzuschalten!"); return 1; }
}
} return 1;
}
for(new i = 0; i < sizeof(pdInfo); i++) {
if(IsACop(playerid)) {
if(IsPlayerInAnyVehicle(playerid)) {
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
if(GetPlayerVehicleID(playerid) == pdInfo[i][id_x]) {
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560) {
if(UCL[GetPlayerVehicleID(playerid)] == 0) {
DestroyObject(UCLObject[GetPlayerVehicleID(playerid)][0]);
UCLObject[GetPlayerVehicleID(playerid)][1] = CreateObject( 19419,0,0,0,0,0,0,80 );
AttachObjectToVehicle( UCLObject[GetPlayerVehicleID(playerid)][1], GetPlayerVehicleID(playerid), 0.000000, -0.200000, 0.800000, 0.000000, 0.000000, 0.000000 ); // <iVO>
SCM(playerid,COLOR_YELLOW,"* Sirene angeschaltet.");
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
} else {
DestroyObject(UCLObject[GetPlayerVehicleID(playerid)][1]);
UCLObject[GetPlayerVehicleID(playerid)][0] = CreateObject( 19420,0,0,0,0,0,0,80 );
AttachObjectToVehicle( UCLObject[GetPlayerVehicleID(playerid)][0], GetPlayerVehicleID(playerid), 0.000000, -0.200000, 0.800000, 0.000000, 0.000000, 0.000000 ); // <iVO>
SCM(playerid,COLOR_YELLOW,"* Sirene abgeschaltet.");
UCL[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}else { SCM(playerid,COLOR_GRAD1,"[SERVER]: Du bist in keinem Zivil Fahzeug(Sultan) des San Andreas Police Department!"); return 1; }
}else { SCM(playerid,COLOR_GRAD1,"[SERVER]: Du bist in keinem Fahrzeug des San Andreas Police Department!"); return 1; }
}else { SCM(playerid, COLOR_GRAD1, "[SERVER]: Du musst der Fahrer der Fahzeuges sein um die Sirene anzuschalten!"); return 1; }
}else { SCM(playerid, COLOR_GRAD1, "[SERVER]: Du musst in einem Fahrzeug sitzen um das Sirene anzuschalten!"); return 1; }
}
} return 1;
}
Ich hoffe mir kann jemand helfen
Gruß Fabi.StaR