Hallo Breadfish
wenn ich "/flock" eingebe kommt "Der Befehl {/flock} existiert nicht"
hier der befehl und was alles dazu gehört
könnt ihr mir vieleicht sagen wo der fehler liegt?
C
#if defined FACTION_CARS_LOCKABLE
#include <ForAllPlayers>
#endif
enum fCar{
fCarid,
fVehid,
Float:fPos[4],
fCol[2],
fFaction[5],
fTuning[14],
fPrice,
#if defined FACTION_CARS_LOCKABLE
bool:fLock
#endif
};
Alles anzeigen
C
#if defined FACTION_CARS_LOCKABLE
if(strcmp(cmd, "/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
Alles anzeigen
Code
#if defined FACTION_CARS_LOCKABLE
public LockFactionCarDoors(){
ForAllPlayers(i){
for(new fc;fc<sizeof(FactionCars);fc++){
if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
if(FactionCars[fc][fLock] == true){
if(GetPlayerFaction(i)==FactionCars[fc][fFaction][0]||GetPlayerFaction(i)==FactionCars[fc][fFaction][1]||GetPlayerFaction(i)==FactionCars[fc][fFaction][2]||GetPlayerFaction(i)==FactionCars[fc][fFaction][3]||GetPlayerFaction(i)==FactionCars[fc][fFaction][4]||GetPlayerAdmin(i) >= NEEDED_ADMINLEVEL)
SetVehicleParamsForPlayer(FactionCars[fc][fCarid],i,false,false);
else
SetVehicleParamsForPlayer(FactionCars[fc][fCarid],i,false,true);
}
}
}
}return true;
}
stock fLockCar(vehicleid){
ForAllPlayers(i)
SetVehicleParamsForPlayer(vehicleid,i,false,true);
return true;
}
stock fUnlockCar(vehicleid){
ForAllPlayers(i)
SetVehicleParamsForPlayer(vehicleid,i,false,false);
return true;
}
#endif
Alles anzeigen
MFG Paddy87