28.01.2016, 17:24
hi there
i made my register system to work like this:
files creating with numbers (%d.ini, aka 1.ini, 2.ini etc..)
then its adding on a file called UsersList.ini this information:
Users = (number of registered users on server)
User1 = 1
User2 = 2
User3 = 3
etc..
Now the problem is if im registering a name with a tag like [tag]testuser1
it will ask me to register every time when im joining in, and if im registering a name testuser1 or (tag)testuser1 it will work and will ask to login after the first time.
this is the code i made to check if the name is registered:
and on OnPlayerConnect:
As i think, DOF2 does not support [ and ] while i tested it with dini and it works.
help?
i made my register system to work like this:
files creating with numbers (%d.ini, aka 1.ini, 2.ini etc..)
then its adding on a file called UsersList.ini this information:
Users = (number of registered users on server)
User1 = 1
User2 = 2
User3 = 3
etc..
Now the problem is if im registering a name with a tag like [tag]testuser1
it will ask me to register every time when im joining in, and if im registering a name testuser1 or (tag)testuser1 it will work and will ask to login after the first time.
this is the code i made to check if the name is registered:
pawn Код:
stock GetPlayerFirstTimeJoin(playerid)
{
new number;
new xp[128];
format(xp, sizeof xp, "ExDM/Users/UsersList.ini");
if(DOF2_IsSet(xp,GetName(playerid)))
{
number = DOF2_GetInt(xp,GetName(playerid));
PlayerNumber[playerid] = number;
}
return number;
}
and on OnPlayerConnect:
pawn Код:
if(DOF2_IsSet("ExDM/Users/UsersList.ini", GetName(playerid)))
{
printf("file found");
}
else
{
printf("no file found");
}
help?