Hi
Ich habe den Job Busfahrer erstellt. Alles funktioniert bis auf wenn ich in den Bus steige und /linie eingebe 13x Du bist in keinem Bus. kommt.
Hier das enum:
enum BUSInfo
{
modelid,
Float:posx,
Float:posy,
Float:posz,
Float:posa,
vcolor1,
vcolor2,
plate[20]
};
forward buslinie1(playerid);
new BUSCARS[21][BUSInfo] = {
{431,1276.80004883,-1811.09997559,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1795.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1799.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1803.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1807.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1815.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1835.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1242.30004883,-1823.59997559,13.69999981,270.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1823.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1827.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1276.79980469,-1831.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{437,1200.50000000,-1836.09997559,13.60000038,270.00000000,2,1,"REISEBUS"}, //Coach
{437,1200.50000000,-1832.09960938,13.60000038,270.00000000,2,1,"REISEBUS"}, //Coach
{437,1200.50000000,-1828.09960938,13.60000038,270.00000000,2,1,"REISEBUS"}, //Coach
{437,1229.50000000,-1835.80004883,13.60000038,270.00000000,2,1,"REISEBUS"}, //Coach
{437,1241.50000000,-1835.79980469,13.60000038,270.00000000,2,1,"REISEBUS"}, //Coach
{437,1253.50000000,-1835.79980469,13.60000038,270.00000000,2,1,"REISEBUS"}, //Coach
{431,1276.79980469,-1819.09960938,13.60000038,90.00000000,1,86,"BUS"}, //Bus
{431,1242.29980469,-1811.59960938,13.69999981,270.00000000,1,86,"BUS"}, //Bus
{431,1242.29980469,-1815.59960938,13.69999981,270.00000000,1,86,"BUS"}, //Bus
{431,1242.29980469,-1819.59960938,13.69999981,270.00000000,1,86,"BUS"} //Bus
};
new BUSCAR[21];
GamemodeInit:
for(new j = 0; j < sizeof BUSCARS; j++)
{
BUSCAR[j] = SetVehicleNumberPlate(CreateVehicle(BUSCARS[j][modelid],BUSCARS[j][posx],BUSCARS[j][posy],BUSCARS[j][posz],BUSCARS[j][posa],BUSCARS[j][vcolor1],BUSCARS[j][vcolor2],-1), BUSCARS[j][plate]);
}
/linie :
CMD:linie(playerid,params[])
{
new isJob = GetPVarInt(playerid,"JobID");
if(isJob == 1)
{
new vehicle = GetPlayerVehicleID(playerid);
for(new i = 0;i<sizeof(BUSCARS);i++)
{
if(vehicle == BUSCAR[i])
{
buslinie1(playerid);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist in keinem Bus.");
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist kein Busfahrer.");
}
return 1;
}
Könntet ihr mir sagen wo mein Fehler ist?
Dankeee im Vorraus