Accounts System with FileManager
#1

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
Reply
#2

Did you define the directory?
Reply
#3

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...
Reply
#4

Do you create
UserDate...?
Reply
#5

Ok Fixed.. thanks you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)