[SOLVED] Dini_create - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] Dini_create (
/showthread.php?tid=94241)
[SOLVED] Dini_create -
Rizard - 28.08.2009
Hi,
Just started learning the dini functions...
Having this code didn't create a file, what does?
pawn Код:
if(!dini_Exists(posfile))
{
GetPlayerName(playerid, PlayerPosName, sizeof(PlayerPosName));
format(posfile, sizeof(posfile), "/xadmin/locations/%s.ini", PlayerPosName);
dini_Create(posfile);
}
Grts Riz
Re: Dini_create -
Jefff - 28.08.2009
Код:
public OnPlayerConnect(playerid)
{
new PlayerPosName[24],posfile[64];
GetPlayerName(playerid, PlayerPosName, sizeof(PlayerPosName));
format(posfile, sizeof(posfile), "/xadmin/locations/%s.ini", PlayerPosName);
if(!dini_Exists(posfile)) dini_Create(posfile);
return 1;
}
Re: Dini_create -
Correlli - 28.08.2009
Maybe the dini file already exists?
Re: Dini_create -
Rizard - 28.08.2009
Thnx Jeff your solution fixed my problem
Grts Riz