[Problem]"Connected. Joining the game..."
#3

It's a basic account system with a GUI.
pawn Код:
public OnPlayerConnect(playerid)
{
  Logged[playerid] = 0;
  new pName[MAX_PLAYER_NAME], file[128];
  GetPlayerName(playerid, pName, sizeof(pName));
  format(file, sizeof(file), "/Users/%s.ini", pName);
  if(!fexist(file))
  {
  SendClientMessage(playerid, COLOR_RED, "[SYSTEM]You do not have an account. Please register to create one.");
  ShowPlayerDialog(playerid, DIALOG_REGISTER, 1, "Please enter a password", "You must register to continue", "Register", "Cancel");
  }

  else if(fexist(file))
  {
  SendClientMessage(playerid, COLOR_YELLOW, "[SYSTEM]This name has been registered. Please login or choose another name!");
  ShowPlayerDialog(playerid, DIALOG_LOGIN, 1, "Please enter your password", "You must log in to continue", "Log in", "Cancel");
  }
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)