I made sure everything is here.
Well 'prodigy' you might be right.... I didn't include it code:
Код:
public OnPlayerSpawn(playerid)
{
new file[256];
format(file, sizeof(file), "Gangs/%d.ini",PlayerInfo[playerid][GangID]);
new gangid = PlayerInfo[playerid][GangID];
if(gangid > 0)
{
if(!(dini_Exists(file)) || strcmp(PlayerInfo[playerid][GangName], GangInfo[gangid][Name], false, strlen(PlayerInfo[playerid][GangName])))
{
SendClientMessage(playerid, 0xFFFFFFFF , "The Gang has been abolished");
PlayerInfo[playerid][GangID] = 0;
PlayerInfo[playerid][GangRank] = 0;
strmid(PlayerInfo[playerid][GangName], " ", 0, strlen(" "), 255);
}
else
{
GiveGangWeapon(playerid);
}
return 1;
}
return 1;
}
This is what I got under onplayerspawn.
Actually,
Код:
forward SaveGangs();
public SaveGangs()
{
new file[256];
for(new i=1;i<=MAX_GANGS;i++)
{
format(file,sizeof(file), "Gangs/%i.ini",i);
if(dini_Exists(file))
{
dini_IntSet(file,"ID",GangInfo[i][ID]);
dini_Set(file,"Name", GangInfo[i][Name]);
dini_Set(file,"Leader", GangInfo[i][Leader]);
dini_FloatSet(file,"Spawnx",GangInfo[i][Spawnx]);
dini_FloatSet(file,"Spawny",GangInfo[i][Spawny]);
dini_FloatSet(file,"Spawnz",GangInfo[i][Spawnz]);
dini_IntSet(file,"Weapon1",GangInfo[i][Weapon1]);
dini_IntSet(file,"Weapon2",GangInfo[i][Weapon2]);
dini_IntSet(file,"Weapon3",GangInfo[i][Weapon3]);
dini_IntSet(file,"Weapon4",GangInfo[i][Weapon4]);
dini_IntSet(file,"Weapon5",GangInfo[i][Weapon5]);
dini_IntSet(file,"Weapon6",GangInfo[i][Weapon6]);
dini_Set(file,"Color",GangInfo[i][Color]);
dini_IntSet(file,"Interior",GangInfo[i][Interior]);
dini_IntSet(file,"Virtual",GangInfo[i][Virtual]);
dini_IntSet(file,"Day",GangInfo[i][Day]);
dini_IntSet(file,"Month",GangInfo[i][Month]);
dini_IntSet(file,"Year",GangInfo[i][Year]);
dini_IntSet(file,"Kills",GangInfo[i][Kills]);
dini_IntSet(file,"Deaths",GangInfo[i][Deaths]);
dini_IntSet(file,"Members",GangInfo[i][Members]);
}
}
return 1;
}
I just don't see why /setspawn is not working.