Hallo Breadfish,
Nach einem Relogg zeigt es das gekaufte Fraktionsfahrzeug nichtmehr an der Code:
Function IstGangAuto(fID,vID)
{
new gangCarID = -1, maxC = CheckGangCar(fID);
for(new i = 1; i < maxC; i++){
if(vID == gcInfo[fID][i][gcCarID])gangCarID = i;
}
if(gangCarID != -1 && gcInfo[fID][gangCarID][gcGang] == fID)return 1;
return 0;
}
LadeGangCars()
{
new path[50];
for(new i=0;i<MAX_GANG_CARS;i++){
format(path, sizeof path, "/GangCars/5/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[5][i][gcID] = INI_ReadInt("ID");
gcInfo[5][i][gcModel] = INI_ReadInt("Model");
gcInfo[5][i][gcGang] = INI_ReadInt("Gang");
gcInfo[5][i][gcX] = INI_ReadFloat("pX");
gcInfo[5][i][gcY] = INI_ReadFloat("pY");
gcInfo[5][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[5][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[5][i][gcCarID] = AddStaticVehicle(gcInfo[5][i][gcModel],gcInfo[5][i][gcX],gcInfo[5][i][gcY],gcInfo[5][i][gcZ],gcInfo[5][i][gcA],GetFrakCarColor(gcInfo[5][i][gcGang]),GetFrakCarColor(gcInfo[5][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/6/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[6][i][gcID] = INI_ReadInt("ID");
gcInfo[6][i][gcID] = INI_ReadInt("Model");
gcInfo[6][i][gcID] = INI_ReadInt("Gang");
gcInfo[6][i][gcX] = INI_ReadFloat("pX");
gcInfo[6][i][gcY] = INI_ReadFloat("pY");
gcInfo[6][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[6][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[6][i][gcCarID] = AddStaticVehicle(gcInfo[6][i][gcModel],gcInfo[6][i][gcX],gcInfo[6][i][gcY],gcInfo[6][i][gcZ],gcInfo[6][i][gcA],GetFrakCarColor(gcInfo[6][i][gcGang]),GetFrakCarColor(gcInfo[6][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/8/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[8][i][gcID] = INI_ReadInt("ID");
gcInfo[8][i][gcID] = INI_ReadInt("Model");
gcInfo[8][i][gcID] = INI_ReadInt("Gang");
gcInfo[8][i][gcX] = INI_ReadFloat("pX");
gcInfo[8][i][gcY] = INI_ReadFloat("pY");
gcInfo[8][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[8][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[8][i][gcCarID] = AddStaticVehicle(gcInfo[8][i][gcModel],gcInfo[8][i][gcX],gcInfo[8][i][gcY],gcInfo[8][i][gcZ],gcInfo[8][i][gcA],GetFrakCarColor(gcInfo[8][i][gcGang]),GetFrakCarColor(gcInfo[8][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/11/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[11][i][gcID] = INI_ReadInt("ID");
gcInfo[11][i][gcID] = INI_ReadInt("Model");
gcInfo[11][i][gcID] = INI_ReadInt("Gang");
gcInfo[11][i][gcX] = INI_ReadFloat("pX");
gcInfo[11][i][gcY] = INI_ReadFloat("pY");
gcInfo[11][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[11][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[11][i][gcCarID] = AddStaticVehicle(gcInfo[11][i][gcModel],gcInfo[11][i][gcX],gcInfo[11][i][gcY],gcInfo[11][i][gcZ],gcInfo[11][i][gcA],GetFrakCarColor(gcInfo[11][i][gcGang]),GetFrakCarColor(gcInfo[11][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/12/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[12][i][gcID] = INI_ReadInt("ID");
gcInfo[12][i][gcID] = INI_ReadInt("Model");
gcInfo[12][i][gcID] = INI_ReadInt("Gang");
gcInfo[12][i][gcX] = INI_ReadFloat("pX");
gcInfo[12][i][gcY] = INI_ReadFloat("pY");
gcInfo[12][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[12][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[12][i][gcCarID] = AddStaticVehicle(gcInfo[12][i][gcModel],gcInfo[12][i][gcX],gcInfo[12][i][gcY],gcInfo[12][i][gcZ],gcInfo[12][i][gcA],GetFrakCarColor(gcInfo[12][i][gcGang]),GetFrakCarColor(gcInfo[12][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/13/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[13][i][gcID] = INI_ReadInt("ID");
gcInfo[13][i][gcID] = INI_ReadInt("Model");
gcInfo[13][i][gcID] = INI_ReadInt("Gang");
gcInfo[13][i][gcX] = INI_ReadFloat("pX");
gcInfo[13][i][gcY] = INI_ReadFloat("pY");
gcInfo[13][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[13][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[13][i][gcCarID] = AddStaticVehicle(gcInfo[13][i][gcModel],gcInfo[13][i][gcX],gcInfo[13][i][gcY],gcInfo[13][i][gcZ],gcInfo[13][i][gcA],GetFrakCarColor(gcInfo[13][i][gcGang]),GetFrakCarColor(gcInfo[13][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/14/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[14][i][gcID] = INI_ReadInt("ID");
gcInfo[14][i][gcID] = INI_ReadInt("Model");
gcInfo[14][i][gcID] = INI_ReadInt("Gang");
gcInfo[14][i][gcX] = INI_ReadFloat("pX");
gcInfo[14][i][gcY] = INI_ReadFloat("pY");
gcInfo[14][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[14][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[14][i][gcCarID] = AddStaticVehicle(gcInfo[14][i][gcModel],gcInfo[14][i][gcX],gcInfo[14][i][gcY],gcInfo[14][i][gcZ],gcInfo[14][i][gcA],GetFrakCarColor(gcInfo[14][i][gcGang]),GetFrakCarColor(gcInfo[14][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/15/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[15][i][gcID] = INI_ReadInt("ID");
gcInfo[15][i][gcID] = INI_ReadInt("Model");
gcInfo[15][i][gcID] = INI_ReadInt("Gang");
gcInfo[15][i][gcX] = INI_ReadFloat("pX");
gcInfo[15][i][gcY] = INI_ReadFloat("pY");
gcInfo[15][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[15][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[15][i][gcCarID] = AddStaticVehicle(gcInfo[15][i][gcModel],gcInfo[15][i][gcX],gcInfo[15][i][gcY],gcInfo[15][i][gcZ],gcInfo[15][i][gcA],GetFrakCarColor(gcInfo[15][i][gcGang]),GetFrakCarColor(gcInfo[15][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/16/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[16][i][gcID] = INI_ReadInt("ID");
gcInfo[16][i][gcID] = INI_ReadInt("Model");
gcInfo[16][i][gcID] = INI_ReadInt("Gang");
gcInfo[16][i][gcX] = INI_ReadFloat("pX");
gcInfo[16][i][gcY] = INI_ReadFloat("pY");
gcInfo[16][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[16][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[16][i][gcCarID] = AddStaticVehicle(gcInfo[16][i][gcModel],gcInfo[16][i][gcX],gcInfo[16][i][gcY],gcInfo[16][i][gcZ],gcInfo[16][i][gcA],GetFrakCarColor(gcInfo[16][i][gcGang]),GetFrakCarColor(gcInfo[16][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/17/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[17][i][gcID] = INI_ReadInt("ID");
gcInfo[17][i][gcID] = INI_ReadInt("Model");
gcInfo[17][i][gcID] = INI_ReadInt("Gang");
gcInfo[17][i][gcX] = INI_ReadFloat("pX");
gcInfo[17][i][gcY] = INI_ReadFloat("pY");
gcInfo[17][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[17][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[17][i][gcCarID] = AddStaticVehicle(gcInfo[17][i][gcModel],gcInfo[17][i][gcX],gcInfo[17][i][gcY],gcInfo[17][i][gcZ],gcInfo[17][i][gcA],GetFrakCarColor(gcInfo[17][i][gcGang]),GetFrakCarColor(gcInfo[17][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/18/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[18][i][gcID] = INI_ReadInt("ID");
gcInfo[18][i][gcID] = INI_ReadInt("Model");
gcInfo[18][i][gcID] = INI_ReadInt("Gang");
gcInfo[18][i][gcX] = INI_ReadFloat("pX");
gcInfo[18][i][gcY] = INI_ReadFloat("pY");
gcInfo[18][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[18][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[18][i][gcCarID] = AddStaticVehicle(gcInfo[18][i][gcModel],gcInfo[18][i][gcX],gcInfo[18][i][gcY],gcInfo[18][i][gcZ],gcInfo[18][i][gcA],GetFrakCarColor(gcInfo[18][i][gcGang]),GetFrakCarColor(gcInfo[18][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/20/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[20][i][gcID] = INI_ReadInt("ID");
gcInfo[20][i][gcID] = INI_ReadInt("Model");
gcInfo[20][i][gcID] = INI_ReadInt("Gang");
gcInfo[20][i][gcX] = INI_ReadFloat("pX");
gcInfo[20][i][gcY] = INI_ReadFloat("pY");
gcInfo[20][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[20][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[20][i][gcCarID] = AddStaticVehicle(gcInfo[20][i][gcModel],gcInfo[20][i][gcX],gcInfo[20][i][gcY],gcInfo[20][i][gcZ],gcInfo[20][i][gcA],GetFrakCarColor(gcInfo[20][i][gcGang]),GetFrakCarColor(gcInfo[20][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/21/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[21][i][gcID] = INI_ReadInt("ID");
gcInfo[21][i][gcID] = INI_ReadInt("Model");
gcInfo[21][i][gcID] = INI_ReadInt("Gang");
gcInfo[21][i][gcX] = INI_ReadFloat("pX");
gcInfo[21][i][gcY] = INI_ReadFloat("pY");
gcInfo[21][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[21][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[21][i][gcCarID] = AddStaticVehicle(gcInfo[21][i][gcModel],gcInfo[21][i][gcX],gcInfo[21][i][gcY],gcInfo[21][i][gcZ],gcInfo[21][i][gcA],GetFrakCarColor(gcInfo[21][i][gcGang]),GetFrakCarColor(gcInfo[21][i][gcGang]));
}
}
format(path, sizeof path, "/GangCars/23/%d.ini",i);
if(fexist(path)){
if(INI_Open(path))
{
gcInfo[23][i][gcID] = INI_ReadInt("ID");
gcInfo[23][i][gcID] = INI_ReadInt("Model");
gcInfo[23][i][gcID] = INI_ReadInt("Gang");
gcInfo[23][i][gcX] = INI_ReadFloat("pX");
gcInfo[23][i][gcY] = INI_ReadFloat("pY");
gcInfo[23][i][gcZ] = INI_ReadFloat("pZ");
gcInfo[23][i][gcA] = INI_ReadFloat("Angle");
INI_Close();
gcInfo[23][i][gcCarID] = AddStaticVehicle(gcInfo[23][i][gcModel],gcInfo[23][i][gcX],gcInfo[23][i][gcY],gcInfo[23][i][gcZ],gcInfo[23][i][gcA],GetFrakCarColor(gcInfo[23][i][gcGang]),GetFrakCarColor(gcInfo[23][i][gcGang]));
}
}
}
return 1;
}
CheckGangCar(fID)
{
new string[75];
for(new i=0;i<MAX_GANG_CARS;i++){
format(string, sizeof(string), "/GangCars/%d/%d.ini",fID,i);
if(fexist(string)){}
else
{
return i;
}
}
return -1;
}
IstGangLeader(pID)
{
if(PlayerInfo[pID][pLeader] == 5)return 1;
else if(PlayerInfo[pID][pLeader] == 6)return 1;
else if(PlayerInfo[pID][pLeader] == 8)return 1;
else if(PlayerInfo[pID][pLeader] == 11)return 1;
else if(PlayerInfo[pID][pLeader] == 12)return 1;
else if(PlayerInfo[pID][pLeader] == 13)return 1;
else if(PlayerInfo[pID][pLeader] == 14)return 1;
else if(PlayerInfo[pID][pLeader] == 15)return 1;
else if(PlayerInfo[pID][pLeader] == 16)return 1;
else if(PlayerInfo[pID][pLeader] == 17)return 1;
else if(PlayerInfo[pID][pLeader] == 18)return 1;
else if(PlayerInfo[pID][pLeader] == 20)return 1;
else if(PlayerInfo[pID][pLeader] == 21)return 1;
else if(PlayerInfo[pID][pLeader] == 23)return 1;
return 0;
}
IstGangKaufAuto(vID)
{
for(new i = 0; i < sizeof(GangAutos); i++)
{
if(GangAutos[i] == vID) return 1;
}
return 0;
}
GetFrakCarColor(fID)
{
if(fID == 5) return 0;
else if(fID == 6) return 1;
else if(fID == 8) return 0;
else if(fID == 11) return 1;
else if(fID == 12) return 3;
else if(fID == 13) return 16;
else if(fID == 14) return 149;
else if(fID == 15) return 61;
else if(fID == 16) return 194;
else if(fID == 17) return 152;
else if(fID == 18) return 163;
else if(fID == 20)return random(500);
else if(fID == 21) return 157;
else if(fID == 23) return 158;
else return 0;
}