Hey
Jeder kann bei einem Car /motor machen.
if(strcmp(cmd, "/engine",true) == 0 || strcmp(cmd, "/motor",true) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
new vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
GetPlayerName(playerid, sendername, sizeof(sendername));
if(vid != INVALID_VEHICLE_ID)
{
if(engine == VEHICLE_PARAMS_ON)
{
StopEngine(playerid,vid);
SendClientMessage(playerid,COLOR_GRAD2," Motor abgeschaltet.");
}
else
{
if(Gas[vid] > 0){
if(PlayerInfo[playerid][pAdmin] >= 1337){
if(Maske[playerid] == 0) {
format(string, sizeof(string), "* %s startet den Motor",sendername);
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 30.0, 2000); SetTimerEx("StartEngineSleep",800,0,"i",playerid);
}
else {
SetPlayerChatBubble(playerid, "* jemand startet einen Motor", COLOR_PURPLE, 30.0, 2000); SetTimerEx("StartEngineSleep",800,0,"i",playerid);
}
SendClientMessage(playerid,COLOR_GRAD2," Motor wird gestartet.");
if(SpawnKillAktiv[playerid] == 1) { SpawnSkillSchutz(playerid);}
return 1;
}
new typ = IsAutohausCar(vid);
new GATyp = IsGangAutohausCar(vid);
if(typ != -1 || GATyp != -1){
SendClientMessage(playerid,COLOR_GRAD2," Du hast keinen Schlüssel für das Fahrzeug.");
return 1;
}
if(IsAMedicCar(vid)){
if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht bei den Medics !"); return 1; }
}
if(IsAFahrschulCar(vid)){
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || TakingLesson[playerid] == 1){}
else{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht bei der Fahrschule oder in einer Fahrstunde.");
return 1;
}}
if(IsATruckerCar(vid)){
if(PlayerInfo[playerid][pJob] == 16){}
else{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist kein Trucker !");
return 1;
}}
if(IsANewsCar(vid)){
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9){}
else{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht bei den News Reportern !");
return 1;
}}
if(IsAOAmtCar(vid)){
if(!IsAOrdnungsbeamter(playerid)){
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht beim Ordnungsamt !");
return 1;
}}
if(IsACopCar(vid)){
if(IsACop(playerid) && OnDuty[playerid] == 1){}
else{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist kein Cop oder nicht OnDuty !");
return 1;
}}
for(new h = 0; h < sizeof(PilotFlug); h++){
if(GetPlayerVehicleID(playerid) == PilotFlug[h]){
if(PlayerInfo[playerid][pJob] == 18)
{
}
else
{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!");
return 1;
}}}
for(new h = 0; h < sizeof(RobTransporter); h++){
if(GetPlayerVehicleID(playerid) == RobTransporter[h]){
if(TransporterRobberID == playerid || IsACop(playerid) && OnDuty[playerid] == 1){}
else {
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!");
return 1;
}}}
for(new h = 0; h < sizeof(GangAutoInfo); h++){
if(vid == GangAutoInfo[h][cID]){
if(PlayerInfo[playerid][pMember] == GangAutoInfo[h][cOwner] || PlayerInfo[playerid][pLeader] == GangAutoInfo[h][cOwner] || TakingLesson[playerid] == 1 && GangAutoInfo[h][cOwner] == 1 || GangAutoInfo[h][cOwner] == 11 || (GangAutoInfo[h][cOwner] == 7 || GangAutoInfo[h][cOwner] == 14 || GangAutoInfo[h][cOwner] == 16) && IsACop(playerid)) { }
else {
SendClientMessage(playerid, COLOR_ERRORTEXT, "Du hast keinen Schlüssel für das Fahrzeug!"); return 1; }
break;
}}
for(new h = 0; h < sizeof(AutomatischeFSCars); h++) {
if(vid == AutomatischeFSCars[h]) {
if(TakingLesson[playerid] == 2) { CP[playerid] = 24; SetPlayerCheckpoint(playerid, 1213.7196,-1841.5648,13.3828, 5.0); }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug! !"); return 1; }
}}
for(new h = 0; h < sizeof(MechanikerWagenCars); h++) {
if(vid == MechanikerWagenCars[h]) {
if(PlayerInfo[playerid][pJob] == 7) { }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug! !"); return 1; }
}}
for(new h = 0; h < sizeof(Drescher); h++) {
if(vid == Drescher[h]) {
if(PlayerInfo[playerid][pJob] == 10) {
if(CP[playerid] == 50) { }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du musst erst mit /harvest die Ernte bestätiegen um den Motor Starten zu können!"); return 1; } }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!"); return 1; }
}}
for(new SlotID = 0; SlotID < sizeof(RentSystemInfo); SlotID++) {
if(vid == RentSystemInfo[SlotID][RSCarID]) {
if(RentSystemInfo[SlotID][RSRenterID] == playerid) { }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!"); return 1; }
}}
for(new car = 0; car < sizeof(KorierVans); car++) {
if(vid == KorierVans[car][KRVehicle]) {
if(KorierVans[car][KRMieterID] == playerid) { }
else {
if(PlayerInfo[playerid][pJob] == 19) { SendClientMessage(playerid, COLOR_GRAD4, " Du musst das Fahrzeug erst Mieten, dies kannst du mit /reservecar machen."); }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!"); }
return 1;
}}}
for(new car = 0; car < sizeof(MulmanInfo); car++){
if(vid == MulmanInfo[car][MmCarID]){
if(MulmanInfo[car][MmLeiher] != playerid){
if(PlayerInfo[playerid][pJob] == 20) { SendClientMessage(playerid, COLOR_GRAD4, " Du musst das Fahrzeug erst Mieten, dies kannst du mit /reservecar machen."); }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!"); }
return 1;
}}}
for(new van = 0; van < 20; van++) {
if(HackerVans[van][Aktive] == 1){
if(vid == HackerVans[van][Vehicle]) {
if(HackerVans[van][MieterID] == playerid) { }
else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!"); return 1;
}}}}
if(Maske[playerid] == 0) { format(string, sizeof(string), "* %s startet den Motor",sendername); SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 30.0, 2000); }
else { SetPlayerChatBubble(playerid, "* jemand startet einen Motor", COLOR_PURPLE, 30.0, 2000); }
SetTimerEx("StartEngineSleep",1300,0,"i",playerid); SendClientMessage(playerid,COLOR_GRAD2," Motor wird gestartet.");
format(string,sizeof(string),"%s macht de motor an/aus.", sendername);
EnterToLog("motor",string);
if(SpawnKillAktiv[playerid] == 1) { SpawnSkillSchutz(playerid);}
}
else { SendClientMessage(playerid,COLOR_GRAD2," Tank leer..."); return 1; }
}
}
return 1;
}
Mfg,