Hallo,
ich habe soeben dieses Script erstellt, jedoch funktioniert es nicht und ich weiß nicht wieso...
Kann mit jemand helfen?
public OnGameModeInit()
{
for(new i=0;i<MAX_CARS;i++)
{
LoadCars(i);
}
}
stock LoadCars(autoid)
{
new SDatei[64];
format(SDatei,50,"/fcars/%d.txt",autoid);
if(!fexist(SDatei))return 0;
FCInfo[autoid][modelid] = dini_Int(SDatei,"Model");
FCInfo[autoid][fcx] = dini_Float(SDatei,"X");
FCInfo[autoid][fcy] = dini_Float(SDatei,"Y");
FCInfo[autoid][fcz] = dini_Float(SDatei,"Z");
FCInfo[autoid][fca] = dini_Float(SDatei,"A");
FCInfo[autoid][Frakid] = dini_Int(SDatei,"Fraktion");
FCInfo[autoid][fcc1] = dini_Int(SDatei,"Farbe1");
FCInfo[autoid][fcc2] = dini_Int(SDatei,"Farbe2");
FCInfo[autoid][open] = dini_Int(SDatei,"Open");
FCInfo[autoid][Opark] = dini_Int(SDatei,"Opark");
if(FCInfo[autoid][Frakid] == 1)
{
LSPDCar[autoid] = CreateVehicle(FCInfo[autoid][modelid],FCInfo[autoid][fcx],FCInfo[autoid][fcy],FCInfo[autoid][fcz],FCInfo[autoid][fca],FCInfo[autoid][fcc1],FCInfo[autoid][fcc2],-1);
return 1;
}
if(FCInfo[autoid][Frakid] == 2)
{
LVPDCar[autoid] = CreateVehicle(FCInfo[autoid][modelid],FCInfo[autoid][fcx],FCInfo[autoid][fcy],FCInfo[autoid][fcz],FCInfo[autoid][fca],FCInfo[autoid][fcc1],FCInfo[autoid][fcc2],-1);
return 1;
}
if(FCInfo[autoid][Frakid] == 3)
{
SFPDCar[autoid] = CreateVehicle(FCInfo[autoid][modelid],FCInfo[autoid][fcx],FCInfo[autoid][fcy],FCInfo[autoid][fcz],FCInfo[autoid][fca],FCInfo[autoid][fcc1],FCInfo[autoid][fcc2],-1);
return 1;
}
if(FCInfo[autoid][Frakid] == 4)
{
FBICar[autoid] = CreateVehicle(FCInfo[autoid][modelid],FCInfo[autoid][fcx],FCInfo[autoid][fcy],FCInfo[autoid][fcz],FCInfo[autoid][fca],FCInfo[autoid][fcc1],FCInfo[autoid][fcc2],-1);
return 1;
}
else
{
CreateVehicle(FCInfo[autoid][modelid],FCInfo[autoid][fcx],FCInfo[autoid][fcy],FCInfo[autoid][fcz],FCInfo[autoid][fca],FCInfo[autoid][fcc1],FCInfo[autoid][fcc2],-1);
return 1;
}
}