Accounts System with FileManager - 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: Accounts System with FileManager (
/showthread.php?tid=213320)
Accounts System with FileManager -
luis_lpv_22 - 18.01.2011
Hi all, I want to make an accounts system with FileManager plugin, but I don't know how to make it correctly.
When u register it should create a directory in: scriptfiles/UserData/%s (player name)
I tried it with this command, but don't works..
pawn Код:
if (strcmp(cmdtext, "/test", true)==0)
{
new directory[100],pName[24];
GetPlayerName(playerid, pName, sizeof(pName));
format(directory, sizeof(directory), "UserData/%s", pName);
dir_create(directory);
return 1;
}
Thanks you. Greetings
Re: Accounts System with FileManager -
Anthonyx3' - 18.01.2011
Did you define the directory?
Respuesta: Accounts System with FileManager -
luis_lpv_22 - 18.01.2011
I don't understand u fine, but I think do u mean this:
pawn Код:
#define PlayerDirectory "UserData/%s"
if (strcmp(cmdtext, "/test", true)==0)
{
new directory[100],pName[24];
GetPlayerName(playerid, pName, sizeof(pName));
format(directory, sizeof(directory), PlayerDirectory, pName);
dir_create(directory);
return 1;
}
I did this too but I think it's the same...
Re: Accounts System with FileManager -
Ricop522 - 18.01.2011
Do you create
UserDate...?
Respuesta: Accounts System with FileManager -
luis_lpv_22 - 18.01.2011
Ok Fixed.. thanks you