Guest User

Untitled

a guest
Feb 5th, 2011
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. public OnPlayerConnect(playerid)
  2. {
  3. new name[MAX_PLAYER_NAME], file[128];
  4. GetPlayerName(playerid, name, sizeof(name));
  5. format(file, sizeof(file), SERVER_USER_FILE, name);
  6. if (!dini_Exists(file))
  7. {
  8. new string[128], playername[MAX_PLAYER_NAME];
  9. GetPlayerName(playerid, playername, sizeof(playername));
  10. format(string, sizeof(string), "The username %s is not in the datebase please register", playername);
  11. SendClientMessage(playerid, White, string);
  12. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Account", "Register account\n\nEnter password:", "Register", "Quit");
  13. }
  14. if(fexist(file))
  15. {
  16. ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Account", "Login to your account\n\nEnter your password:", "Login", "Quit");
  17. new string[128], playername[MAX_PLAYER_NAME];
  18. GetPlayerName(playerid, playername, sizeof(playername));
  19. format(string, sizeof(string), "The username %s is registered login to your account", playername);
  20. SendClientMessage(playerid, Green, string);
  21. }
  22. return 1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment