06.07.2010, 19:22
I'm currently creating a dynamic spawn for New Players, but I can't seem to get it to work.
I want it to check if there is a file called "NewbieSpawn.ini" in a folder called "ServerS" when the Gamemode starts up, if there ain't it creates a default Newbie Spawn.
But it simple won't create the file, and store the data in it, when I try to launch the server.
Under OnGameModeInit ...
Thanks to everyone who helps me!
Edit: Problem Solved.
I want it to check if there is a file called "NewbieSpawn.ini" in a folder called "ServerS" when the Gamemode starts up, if there ain't it creates a default Newbie Spawn.
But it simple won't create the file, and store the data in it, when I try to launch the server.
Under OnGameModeInit ...
pawn Код:
format(File, sizeof(File), "RLRPFiles/ServerS/NewbieSpawn.ini");
if(dini_Exists(File))
{
nSpawn[X] = dini_Float(File, "X");
nSpawn[Y] = dini_Float(File, "Y");
nSpawn[Z] = dini_Float(File, "Z");
nSpawn[Angle] = dini_Float(File, "Angle");
}
else
{
dini_Create(File);
dini_FloatSet(File, "X", 1642.0287);
dini_FloatSet(File, "Y", -2333.9985);
dini_FloatSet(File, "Z", 13.5469);
dini_FloatSet(File, "Angle", 359.3964);
}
Edit: Problem Solved.