27.06.2009, 14:42
Hi.. I'm doing script, when I restart my gamemode, that all vehicles would stay in the same positions like before restarting.. Here is the script:
I don't know where is positions.txt file. Can you tell is this good script? And how to load that file when my servers turns on.
Код:
public OnGameModeExit()
{
for(new k = 0; k < MAX_VEHICLES; k++)
{
new string[128];
new Float:X, Float:Z, Float:Y;
GetVehiclePos(k, X, Y, Z);
new File:pos=fopen("positions.txt", io_append);
format(string, 256, "GetVehiclePos", X, Y, Z);
fwrite(pos, string);
fclose(pos);
}
return 1;
}

