Hallo Breadfish-Community
Ich mir eine /fcarinfo erstellt da sehen die Leader die infos über die autos, und die member sehen die info nur für das fahrzeug wo die drine sitzen
aber sitzt der leader im Fahrzeug und gibt /fcarinfo ein, Crash sein game aber nur wenn das fahrzeug abgeschleppt ist
Code
ocmd:fcarinfo(playerid)
{
new string[4096],text1[100],text2[100],vehicleid = GetPlayerVehicleID(playerid);
for(new fc;fc<sizeof(FactionCars);fc++)
{
print("/fcarinfo 1");
if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
{
print("/fcarinfo 2");
if(GetPlayerLeader(playerid) == FactionCars[fc][fFaction][0])
{
print("/fcarinfo 3");
if(FactionCars[fc][fTankart] == 1) { text1 = "{FFFF00}Benzin"; }
else if(FactionCars[fc][fTankart] == 2) { text1 = "{FFFF00}Diesel"; }
else if(FactionCars[fc][fTankart] == 3) { text1 = "{FFFF00}Erdgas"; }
if(FactionCars[fc][fTankart] == 1) { text2 = "{FFFF00}Abgeschleppt"; }
else if(FactionCars[fc][fTankart] == 2) { text2 = "{FFFF00}-"; }
format(string, sizeof(string), "%s\n{FFFFFF}Auto: {FFFF00}%s (%d) {FFFFFF}| Fahrer: {FFFF00}%s {FFFFFF}| Tankart: %s %s %s", string,CarName[FactionCars[fc][fVehid]-400],FactionCars[fc][fCarid], LastDriver[fc],text1,text2);
}
else if(GetPlayerMember(playerid) == FactionCars[fc][fFaction][0])
{
print("/fcarinfo 7");
if(IsPlayerInAnyVehicle(playerid))
{
print("/fcarinfo 8");
if(FactionCars[fc][fCarid] == vehicleid)
{
print("/fcarinfo 9");
if(FactionCars[fc][fTankart] == 1) { text1 = "{FFFF00}Benzin"; }
else if(FactionCars[fc][fTankart] == 2) { text1 = "{FFFF00}Diesel"; }
else if(FactionCars[fc][fTankart] == 3) { text1 = "{FFFF00}Erdgas"; }
format(string, sizeof(string), "{FFFFFF}Auto: {FFFF00}%s {FFFFFF}| Tankart: %s %s", CarName[FactionCars[fc][fVehid]-400],text1);
ShowPlayerDialog(playerid,DIALOG_SONSTIGES,DIALOG_STYLE_LIST,"Frakautoinfo",string,"oky","Abbrechen");
print("/fcarinfo 10");
return 1;
}
}
else
{
print("/fcarinfo 11");
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im Fahrzeug");
return 1;
}
}
}
}
print("/fcarinfo 12");
ShowPlayerDialog(playerid,DIALOG_SONSTIGES2,DIALOG_STYLE_LIST,"Frakautoinfo",string,"oky","Abbrechen");
return 1;
}
Alles anzeigen
MFg Paddy87
PS: danke für eure hilfe die mir helfen