hay
ich habe ein problem der befehl flock geht nicht könnt ihr mir vllt helfen?
wenn ich den befehl ein gebe passiert nichts nicht mal eine fehler meldung
#if defined FACTION_CARS_LOCKABLE
if(strcmp(cmdtext,"/flock",true)==0){
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
for(new fc;fc<sizeof(FactionCars);fc++){
if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
if(GetPlayerVehicleID(playerid) == FactionCars[fc][fCarid]){
for(new f;f<5;f++){
if(GetPlayerAdmin(playerid) >= NEEDED_ADMINLEVEL || GetPlayerFaction(playerid) == FactionCars[fc][fFaction][f]){
PlayerPlaySound(playerid,1145,0.0,0.0,0.0);
if(FactionCars[fc][fLock] == true){
FactionCars[fc][fLock] = false;
fUnlockCar(FactionCars[fc][fCarid]);
GameTextForPlayer(playerid,"~w~Fahrzeug~n~~g~Aufgeschlossen",5000,3);
}
else if(FactionCars[fc][fLock] == false){
fLockCar(FactionCars[fc][fCarid]);
FactionCars[fc][fLock] = true;
GameTextForPlayer(playerid,"~w~Fahrzeug~n~~r~Abgeschlossen",5000,3);
}break;
}
}return true;
}
}
}SendClientMessage(playerid,FACTION_COL_GREY,"Du sitzt in keinem Fraktionsfahrzeug!");
}else{
if(GetPlayerState(playerid)==PLAYER_STATE_PASSENGER)
SendClientMessage(playerid,FACTION_COL_GREY,"Du musst der Fahrer dieses Fahrzeuges sein.");
else
SendClientMessage(playerid,FACTION_COL_GREY,"Du muss in einem Fahrzeug sitzen.");
}return true;
}
#endif
return 1;
}
dcmd_efa(playerid,params[]){
if(GetPlayerAdmin(playerid) >= NEEDED_ADMINLEVEL){
new vehid,col1,col2,faction[5];
if(!sscanf(params,"dddd",vehid,col1,col2,faction[0])){
sscanf(params,"dddddddd",vehid,col1,col2,faction[0],faction[1],faction[2],faction[3],faction[4]);
if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,FACTION_COL_GREY,"Vehicle-ID nur von 400 bis 611.");
if(col1 < 0 || col1 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(1)!");
if(col2 < 0 || col2 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(2)!");
if(faction[0] && faction[0] <= MAX_FACTIONS){
for(new f;f<5;f++){
if(faction[f] <= 0 || faction[f] > MAX_FACTIONS){
faction[f] = -255;
}
}
for(new fc;fc<sizeof(FactionCars);fc++){
if(FactionCars[fc][fVehid] < 400 || FactionCars[fc][fVehid] > 611){
FactionCars[fc][fVehid] = vehid;
new Float:fX,Float:fY,Float:fZ,Float:fA;
GetPlayerPos(playerid,fX,fY,fZ),GetPlayerFacingAngle(playerid,fA);
FactionCars[fc][fPos][0] = fX;
FactionCars[fc][fPos][1] = fY;
FactionCars[fc][fPos][2] = fZ;
FactionCars[fc][fPos][3] = fA;
FactionCars[fc][fCol][0] = col1;
FactionCars[fc][fCol][1] = col2;
for(new f;f<5;f++){
FactionCars[fc][fFaction][f] = faction[f];
}
FactionCars[fc][fPrice] = 0;
for(new mod;mod<14;mod++)
FactionCars[fc][fTuning][mod] = 0;
FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255);
#if defined FACTION_CARS_LOCKABLE
FactionCars[fc][fLock] = true;
#endif
SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug erfolgreich erstellt.");
SendClientMessage(playerid,FACTION_COL_YELLOW,"Vergesse es nicht mit '/fpark' umzuparken.");
PutPlayerInVehicle(playerid,FactionCars[fc][fCarid],0);
return true;
}
}SendClientMessage(playerid,FACTION_COL_GREY,"Die Maximale Anzahl von Fraktionsfahrzeugen wurde bereits erreicht.");
}else SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Fraktion!");
}else SendClientMessage(playerid,FACTION_COL_GREY,"Benutze: '/efa [Model] [Farbe(1)] [Farbe(2)] [Hauptfraktion]'.");
}else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
return true;
}