// This is OnGameModeInit
~
new factionfile[128];
for(new i; i<MAX_FACTIONS;i++)
{
format(factionfile, sizeof (factionfile), "Factions/%d.INI", i);
if(!fexist(factionfile)) SaveFaction();
INI_ParseFile(factionfile, "LoadFaction", .bExtra = true, .extra = i, .bLocal=true);
}
// This is somewhere on the script
forward LoadFaction(factionid, name[], value[]);
public LoadFaction(factionid, name[], value[])
{
if(!strcmp(name,"Name")) strmid(FactionInfo[factionid][fName], value, 0, 32, 32);
if(!strcmp(name,"Rank1")) strmid(FactionInfo[factionid][fRank1], value, 0, 15, 15);
if(!strcmp(name,"Rank16"))strmid( FactionInfo[factionid][fRank16], value, 0, 15, 15);
if(!strcmp(name,"Skin1")) FactionInfo[factionid][fSkin1]=strval(value);
if(!strcmp(name,"InteriorX")) FactionInfo[factionid][fInteriorX]=floatstr(value);
if(!strcmp(name,"InteriorY")) FactionInfo[factionid][fInteriorY]=floatstr(value);
if(!strcmp(name,"InteriorZ")) FactionInfo[factionid][fInteriorZ]=floatstr(value);
if(!strcmp(name,"ExteriorX")) FactionInfo[factionid][fExteriorX]=floatstr(value);
if(!strcmp(name,"ExteriorY")) FactionInfo[factionid][fExteriorY]=floatstr(value);
if(!strcmp(name,"ExteriorZ")) FactionInfo[factionid][fExteriorZ]=floatstr(value);
if(!strcmp(name,"Interior")) FactionInfo[factionid][fInterior]=strval(value);
if(!strcmp(name,"Locked")) FactionInfo[factionid][fLocked]=strval(value);
return 1;
}
If you had taken your time reading the big post litterally screaming "read this before posting" maybe I would of helped
![]() |
If I had the time to wait for your answer I wouldn't have made the bump.
|
for( new i; i < MAX_FACTIONS; i++ )
{
new factionfile[ 128 ];
format( factionfile, sizeof factionfile, "Factions/%d.INI", i );
if( !fexist( factionfile ) ) SaveFaction( );
INI_ParseFile( factionfile, "LoadFaction", .bExtra = true, .extra = i, .bLocal=true );
}
for( new i; i < MAX_FACTIONS; i++ )
{
new factionfile[ 128 ];
format( factionfile, sizeof factionfile, "Factions/%d.INI", i );
//if( !fexist( factionfile ) ) SaveFaction( );
INI_ParseFile( factionfile, "LoadFaction", .bExtra = true, .extra = i, .bLocal=true );
}
for( new i; i < MAX_FACTIONS; i++ )
{
new factionfile[ 128 ];
format( factionfile, sizeof factionfile, "Factions/%d.INI", i );
if( !fexist( factionfile ) ) SaveFaction( );
format( factionfile, sizeof factionfile, "Factions/%d.INI", i );
INI_ParseFile( factionfile, "LoadFaction", .bExtra = true, .extra = i, .bLocal=true );
}