Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerConnect(playerid)
- {
- new name[MAX_PLAYER_NAME], file[128];
- GetPlayerName(playerid, name, sizeof(name));
- format(file, sizeof(file), SERVER_USER_FILE, name);
- if (!dini_Exists(file))
- {
- new string[128], playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- format(string, sizeof(string), "The username %s is not in the datebase please register", playername);
- SendClientMessage(playerid, White, string);
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Account", "Register account\n\nEnter password:", "Register", "Quit");
- }
- if(fexist(file))
- {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Account", "Login to your account\n\nEnter your password:", "Login", "Quit");
- new string[128], playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- format(string, sizeof(string), "The username %s is registered login to your account", playername);
- SendClientMessage(playerid, Green, string);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment