10.03.2013, 09:04
PHP код:
public OnGameModeExit()
{
FadeExit();
for(new maxcars = 0; maxcars < 1000; maxcars++)
{
new iLoveKrustyKrab[128];
format(iLoveKrustyKrab, 128, "Vehicles/%d.ini", maxcars);
if(!dfile_FileExists(iLoveKrustyKrab)) continue;
dfile_Open(iLoveKrustyKrab);
dfile_WriteInt("Spawned", 0);
dfile_SaveFile();
dfile_CloseFile();
printf("Vehicle File %d changed to spawned 0", maxcars);
}
for(new ik = 0; ik < MAX_PLAYERS; ik++)
{
if(Logged[ik] == 1)
{
OnPlayerDisconnect(ik, 0);
}
}
return 1;
}
PHP код:
for(new i=0; i<999; i++)
{
new ch1[128];
format(ch1, sizeof(ch1), "Vehicles/%d.ini", i);
if(dfile_FileExists(ch1))
{
dfile_Open(ch1);
if(dfile_ReadInt("Server") == 1)
{
LoadVehicle(i);
dfile_SaveFile();
dfile_CloseFile();
}
}
}