25.09.2014, 11:35
(
Последний раз редактировалось Rudy_; 28.09.2014 в 15:26.
)
Hello everyone. I'm having a bit of problem, Hope if someone knows a fix.
My problem is that i have 2 teams, But in the game it dosen't load team 2 (team_hunter)
While team_prop works fine :/
Edit: Debug says team_hunter positions are loaded correctly, but ingame i can't change to team_hunter
0 for prop and 1 for hunter
waiting for help :/
My problem is that i have 2 teams, But in the game it dosen't load team 2 (team_hunter)
While team_prop works fine :/
Edit: Debug says team_hunter positions are loaded correctly, but ingame i can't change to team_hunter
pawn Код:
new team_prop;
new team_hunter;
pawn Код:
#define Spawn_Path "/Maps/Spawns/%s.ini"
pawn Код:
format(Processing, sizeof(Processing), Spawn_Path, Maps[Map]); //Reads the spawns file
Pointer = fopen(Processing, filemode:io_read);
if(!Pointer) return 0;
Count = 0; // Now being used as a Hunter or Prop specifier.
while(fread(Pointer, Length, 256) > 0)
{
new Index = 0;
Index = FindValue(Length, Processing, ',', Index);
if(Index == -1) continue;
Count = strval(Processing);
if(Count == 0) // Team Prop Spawn
{
Index = FindValue(Length, Processing, ',', Index+1);
if(Index == -1) continue;
PropSpawns[PropSpawnCount][Pos][0] = floatstr(Processing);
#if defined DEBUG_BUILD
printf("%f", floatstr(Processing));
#endif
Index = FindValue(Length, Processing, ',', Index+1);
if(Index == -1) continue;
PropSpawns[PropSpawnCount][Pos][1] = floatstr(Processing);
Index = FindValue(Length, Processing, ',', Index+1);
if(Index == -1) continue;
PropSpawns[PropSpawnCount][Pos][2] = floatstr(Processing);
Index = FindValue(Length, Processing, ';', Index+1);
if(Index == -1) continue;
PropSpawns[PropSpawnCount][Pos][3] = floatstr(Processing);
PropSpawnCount++;
}
else if (Count == 1) //Hunter Spawns
{
Index = FindValue(Length, Processing, ',', Index+1);
if(Index == -1) continue;
HunterSpawns[HunterSpawnCount][Pos][0] = floatstr(Processing);
Index = FindValue(Length, Processing, ',', Index+1);
if(Index == -1) continue;
HunterSpawns[HunterSpawnCount][Pos][1] = floatstr(Processing);
Index = FindValue(Length, Processing, ',', Index+1);
if(Index == -1) continue;
HunterSpawns[HunterSpawnCount][Pos][2] = floatstr(Processing);
Index = FindValue(Length, Processing, ';', Index+1);
if(Index == -1) continue;
HunterSpawns[HunterSpawnCount][Pos][3] = floatstr(Processing);
HunterSpawnCount++;
}
}
fclose(Pointer);
print("Spawn Positions Loaded!");
return 1;
}