Hey Leute ich frage mich immer noch warum es nicht funktzioniert das nur die leute aus der Fraktion die zugewissenen Cars fahren können hier mal ein beispiel von den Ballas Cars
new BallasVehs[12];
if(!IsPlayerInFrac(playerid,14))
{
for(new pv = 0; pv < sizeof(BallasVehs); pv++)
{
if(newcar == BallasVehs[pv])
{
SendClientMessage(playerid,Rot,"Du hast keine Schlüssel für Ballas Fahrzeuge!");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid,false);
TogglePlayerControllable(playerid,true);
return 1;
}
}
}
BallasVehs[0] = CreateVehicle(522,1996.0300,-1116.1958,26.3446,209.2177,174,174,-1); // Ballas NRG1
//BallasVehs[1] = CreateVehicle(522,1994.1499,-1116.4078,26.3391,213.1607,174,174,-1); // Ballas NRG2
BallasVehs[1] = CreateVehicle(487,2004.4164,-1109.0201,34.3686,182.2612,174,174,-1); // Heli-Ballas
BallasVehs[2] = CreateVehicle(560,1988.3494,-1130.8279,25.4308,89.3931,174,174,-1); // Sultan-Ballas1
BallasVehs[3] = CreateVehicle(560,1994.1672,-1130.9825,25.2776,89.1939,174,174,-1); // Sultan-Ballas2
//BallasVehs[5] = CreateVehicle(541,2017.9784,-1107.8317,25.8286,85.6548,174,174,-1); // bullet-ballas1
BallasVehs[4] = CreateVehicle(541,2023.8640,-1108.3197,25.8274,84.0550,174,174,-1); // bullet-ballas2
BallasVehs[5] = CreateVehicle(405,2052.0059,-1123.1750,24.2270,179.5757,174,174,-1); // Sentinel-ballas2
BallasVehs[6] = CreateVehicle(405,2051.9841,-1117.2346,24.9335,180.6647,174,174,-1); // Sentinel-ballas1
BallasVehs[7] = CreateVehicle(409,2006.5040,-1120.4972,26.3119,129.9462,174,174,-1); // Limo-balls
BallasVehs[8] = CreateVehicle(482,2012.0787,-1093.8931,24.7904,71.5720,174,174,-1); // ballas-truck
BallasVehs[9] = CreateVehicle(517,2023.0383,-1140.9012,24.6153,89.0515,174,174,-1); // Majestic-Balls1
BallasVehs[10] = CreateVehicle(517,2034.4393,-1141.0892,24.2927,88.4828,174,174,-1); // Majestic-Balls2
for(new pv = 0; pv < sizeof(BallasVehs); pv++)
{
SetVehicleNumberPlate(BallasVehs[pv], "BALLAS");
SetVehicleToRespawn(BallasVehs[pv]);
}
Was ist falsch? was fehlt?