Hallo Community,
könntet ihr mir sagen was an denn befehlen falsch ist das der Compiler Crasht ? :O
ocmd:carsysmenu(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,7) && !CallRemoteFunction("PlayerIsAdmin","i",playerid))
{
SendClientMessage(playerid,COLOR_GREY," Du hast nicht die nötigen Rechte!");
return 1;
}
new str[50];
new str2[120];
format(str,sizeof(str),"[DT]Dynamic Car Admin-Menu (V: %s)",Dtdc_Version);
format(str2,sizeof(str2),"Configuration\nLog Configuration\nAutohaeuser\nResprayer");
new checker = Dtdc_Updater;
if(checker==1){format(str2,sizeof(str2),"%s\nAuf Updates Prüfen",str2);}
ShowPlayerDialog(playerid,AdminDia,DIALOG_STYLE_LIST,str,str2,"OK","Abbrechen");
Dtdc_Player[playerid][AdminDialog] = AdminMainDia;
return 1;
}
ocmd:carhelp(playerid,params[])
{
new string[120];
format(string,sizeof(string)," | COMMANDS | /carinfo");
if(Dtdc_ParkCommand == 0) {format(string,sizeof(string),"%s /parken",string);}
format(string,sizeof(string),"%s /carsell",string);
SendClientMessage(playerid, COLOR_LIGHTBLUE," ------------------[CARHELP]-------------------");
SendClientMessage(playerid, COLOR_WHITE,string);// " | COMMANDS | /parken /carlock /carkey /carsell"
if(Dtdc_LockOrAlarm == 0 || Dtdc_LockOrAlarm == 4) {format(string,sizeof(string)," | COMMANDS | /carlock");} else { format(string,sizeof(string)," | COMMANDS | /caralarm"); }
if(Dtdc_LockOrAlarm == 1) {format(string,sizeof(string),"%s /buycaralarm",string);}
if(Dtdc_CmdCarList == 0){format(string,sizeof(string),"%s /carlist",string);}
SendClientMessage(playerid, COLOR_WHITE,string);//" | COMMANDS | /giveparkrights /givecarkey /carkeylock");
if(isPlayerAnAdmin(playerid,7) || CallRemoteFunction("PlayerIsAdmin","i",playerid)){SendClientMessage(playerid, COLOR_WHITE, " | ADMINCMDS | /dtdcamenu");}
SendClientMessage(playerid, COLOR_LIGHTBLUE," ---------[www.dark-trigardon.de]---------");
return 1;
}
ocmd:carlist(playerid,params[]) == 0 && Dtdc_CmdCarList == 0
{
new string[200];
new bool:check = true;
for(new c = 0; c <MaxVehPerPlayer;c++)
{
if(Dtdc_Player[playerid][Car][code=c] != MaxVehicle +1)
{
new carid = Dtdc_Player[playerid][Car][code=c];
if(check)
{
check = false;
format(string,sizeof(string),"%s",Dtdc_CarName[GetVehicleModel(Dtdc_Car[carid][cCarId])-400]);
} else {
format(string,sizeof(string),"%s\n%s",string,Dtdc_CarName[GetVehicleModel(Dtdc_Car[carid][cCarId])-400]);
}
}
}
if(check)
{
SendClientMessage(playerid,COLOR_GREY," Du besitzt keine Autos");
return 1;
}
ShowPlayerDialog(playerid,UserDia,DIALOG_STYLE_LIST,"Deine Fahrzeuge:",string,"Auswahl","Abbrechen");
Dtdc_Player[playerid][UserDialog] = CarlistDia;
return 1;
}
ocmd:caralarm(playerid,params[]) == 0 && (Dtdc_LockOrAlarm != 0 && Dtdc_LockOrAlarm != 3)
{
new car = Dtdc_GetCarNearPlayer(playerid,true,10.0);
if(car != -1)
{
if(Dtdc_Car[car][cAlarmBuyed] != 1 && Dtdc_LockOrAlarm == 1)
{
SendClientMessage(playerid,COLOR_GREY," Dieses Auto besitzt keine Alarmanlage! Kaufe eine mit /buycaralarm");
return 1;
}
if(Dtdc_Car[car][cLocked] == 1)
{
Dtdc_Car[car][cLocked] = 0;
SendClientMessage(playerid,COLOR_YELLOW," Du hast die Alarmanlage deines Autos abgeschaltet!");
GameTextForPlayer(playerid,"~g~Alarmanlage deaktivert!",3000,1);
} else {
Dtdc_Car[car][cLocked] = 1;
SendClientMessage(playerid,COLOR_YELLOW," Du hast die Alarmanlage deines Autos angeschaltet!");
GameTextForPlayer(playerid,"~r~Alarmanlage aktivert!",3000,1);
}
return 1;
} else {
SendClientMessage(playerid,COLOR_GREY," Es ist kein Auto in der nähe welches du besitzt!");
return 1;
}
}
ocmd:carlock(playerid,params[]) == 0 && (Dtdc_LockOrAlarm != 1 && Dtdc_LockOrAlarm != 2)
{
new car = Dtdc_GetCarNearPlayer(playerid,true,10.0);
if(car != -1)
{
if(Dtdc_Car[car][cLocked] == 1)
{
Dtdc_Car[car][cLocked] = 0;
if(Dtdc_LockOrAlarm == 0) {SetVehicleLock(Dtdc_Car[car][cCarId],Dtdc_Car[car][cLocked]);}
SendClientMessage(playerid,COLOR_YELLOW," Du hast dein Auto aufgeschlossen!");
GameTextForPlayer(playerid,"~g~Fahrzeug aufgeschlossen!",3000,1);
} else {
Dtdc_Car[car][cLocked] = 1;
if(Dtdc_LockOrAlarm == 0) {SetVehicleLock(Dtdc_Car[car][cCarId],Dtdc_Car[car][cLocked]);}
SendClientMessage(playerid,COLOR_YELLOW," Du hast dein Auto abgeschlossen!");
GameTextForPlayer(playerid,"~r~Fahrzeug abgeschlossen!",3000,1);
}
return 1;
} else {
SendClientMessage(playerid,COLOR_GREY," Es ist kein Auto in der nähe welches du besitzt!");
return 1;
}
}
ocmd:buycaralarm(playerid,params[]) == 0 && Dtdc_LockOrAlarm == 1
{
if(IsPlayerInAnyVehicle(playerid))
{
new veh = GetPlayerVehicleID(playerid);
new car = Dtdc_GetCarArrayId(veh);
if(car != -1)
{
if(Dtdc_Car[car][cOwnerOnline] != playerid)
{
SendClientMessage(playerid,COLOR_GREY," Dieses Auto gehört nicht dir!");
return 1;
}
if(Dtdc_Car[car][cAlarmBuyed] == 1)
{
SendClientMessage(playerid,COLOR_GREY," Dieses Auto besitzt schon eine Alarmanlage!");
return 1;
}
if(GetPlayerMoney(playerid) < 2500)
{
SendClientMessage(playerid,COLOR_GREY," Du besitzt nicht genug Geld! Du benötigst 2500$!");
return 1;
}
Dtdc_Car[car][cAlarmBuyed] = 1;
SendClientMessage(playerid,COLOR_YELLOW,"Alarmanlage wurde erfolgreich gekauft und eingebaut benutze /caralarm in der nähe deines Wagens um sie zu aktivieren!");
return 1;
} else {
SendClientMessage(playerid,COLOR_GREY," Dieses Auto gehört keinem!");
return 1;
}
} else {
SendClientMessage(playerid,COLOR_GREY," Du musst in deinem Auto sein!");
return 1;
}
}
ocmd:parken(playerid,params[]) == 0 && Dtdc_ParkCommand == 0
{
if(IsPlayerInAnyVehicle(playerid))
{
new veh = GetPlayerVehicleID(playerid);
new car = Dtdc_GetCarArrayId(veh);
if(car != -1)
{
if(Dtdc_Car[car][cOwnerOnline] != playerid)
{
SendClientMessage(playerid,COLOR_GREY," Dieses Auto gehört nicht dir!");
return 1;
}
GetVehiclePos(veh,Dtdc_Car[car][cPosX],Dtdc_Car[car][cPosY],Dtdc_Car[car][cPosZ]);
GetVehicleZAngle(veh,Dtdc_Car[car][cRotZ]);
Dtdc_Car[car][cVW] =GetVehicleVirtualWorld(Dtdc_Car[car][cCarId]);
new string[80];
format(string,sizeof(string),"%s%d.ini",Dtdc_Car[car][cOwnerName],Dtdc_Car[car][cSlotid]);
Dtdc_Log(3,"------[/parken]------");
Dtdc_SaveVeh(string,car);
SendClientMessage(playerid,COLOR_YELLOW,"Dein Auto wurde erfolgreich geparkt!");
return 1;
} else {
SendClientMessage(playerid,COLOR_GREY," Dieses Auto gehört keinem!");
return 1;
}
} else {
SendClientMessage(playerid,COLOR_GREY," Du musst in deinem Auto sein!");
return 1;
}
}
ocmd:carinfo(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
new veh = GetPlayerVehicleID(playerid);
new carid = Dtdc_GetCarArrayId(veh);
if(carid != -1)
{
new string[120];
SendClientMessage(playerid, COLOR_LIGHTBLUE," ------------------[CARINFO]------------------");
new checker = Cars4Eva;
if(checker == 1)
{
new onoff[20] = "Online";
if(Dtdc_Car[carid][cOwnerOnline] == MAX_PLAYERS+1){onoff ="Offline";}
format(string,sizeof(string)," | Besitzer: %s (%s) Fahrzeug-Name: %s",Dtdc_Car[carid][cOwnerName],onoff,Dtdc_CarName[GetVehicleModel(Dtdc_Car[carid][cCarId])-400]);
} else {format(string,sizeof(string)," | Besitzer: %s Fahrzeug-Name: %s",Dtdc_Car[carid][cOwnerName],Dtdc_CarName[GetVehicleModel(Dtdc_Car[carid][cCarId])-400]);}
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
} else {
SendClientMessage(playerid,COLOR_GREY," Dieses Auto gehört keinem!");
return 1;
}
} else {
SendClientMessage(playerid,COLOR_GREY," Du musst in einem Auto sein!");
return 1;
}
}
ocmd:carsell(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
new carid = Dtdc_GetCarArrayId(GetPlayerVehicleID(playerid));
if(carid != -1)
{
if(Dtdc_Car[carid][cOwnerOnline] != playerid)
{
SendClientMessage(playerid,COLOR_GREY," Dieses Auto gehört nicht dir!");
return 1;
}
new preis = Dtdc_Car[carid][cPreis]/3*2;
Dtdc_Player[playerid][SellCar] = carid;
new string[120];
format(string,sizeof(string),"An Gebrauchtwagenhändler verkaufen (%d$)\nAn anderen Spieler verkaufen",preis);
ShowPlayerDialog(playerid,UserDia,DIALOG_STYLE_LIST,"Fahrzeug Verkaus-Optionen",string,"OK","Abbrechen");
Dtdc_Player[playerid][UserDialog] = UserSellDia;
return 1;
} else {
SendClientMessage(playerid,COLOR_GREY," Dieses Auto gehört nicht dir!");
return 1;
}
} else {
SendClientMessage(playerid,COLOR_GREY," Du musst in einem Auto sein!");
return 1;
}
}
hoffe auf eine Schnelle antwort
Mit Freundlichen Grüßen
- Kevin