20.04.2009, 12:48
Hi all,
I created a FS for registration (with /login and /register).
I use dini and dudb.
But i want to change all function used by dini to function used with "fcreate", "fexist", "fopen" ...
That is my callback OnPlayerConnect. How to change function in bold to function file ?
public OnPlayerConnect(playerid)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if (!udb_Exists(PName(playerid)))
{
SendClientMessage(playerid,0xFFFF00AA,"Create an account with /register");
}
if (udb_Exists(PName(playerid)))
{
SendClientMessage(playerid,0xFFFF00AA,"Login to your account with /login");
}
PLAYERLIST_authed[playerid] = false;
return false;
}
Thanks all !
PS: Sorry for my bad english, i'm french !
I created a FS for registration (with /login and /register).
I use dini and dudb.
But i want to change all function used by dini to function used with "fcreate", "fexist", "fopen" ...
That is my callback OnPlayerConnect. How to change function in bold to function file ?
public OnPlayerConnect(playerid)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if (!udb_Exists(PName(playerid)))
{
SendClientMessage(playerid,0xFFFF00AA,"Create an account with /register");
}
if (udb_Exists(PName(playerid)))
{
SendClientMessage(playerid,0xFFFF00AA,"Login to your account with /login");
}
PLAYERLIST_authed[playerid] = false;
return false;
}
Thanks all !
PS: Sorry for my bad english, i'm french !