[ZCMD]Help With Warning Whent Player Login Fail to server
#9

Quote:
Originally Posted by donhu789
Посмотреть сообщение
you want this ??

PHP код:
public OnPlayerConnect(playerid)
{
    if (
udb_Exists(PlayerName2(playerid)))
    {
      if(
PlayerInfo[playerid][LoggedIn] == 0)
      {
          new 
string[500];
          
format(stringsizeof(string),""cwhite"Welcome Back"cred"%s "cwhite" To Call Of Duty Wolrd At War\nYour Account Is Already Registered!\nEnter Your Password Below To Load Your Status\n(Score,Cash,rank,Kills,etc)"PlayerName2(playerid));
          
ShowPlayerDialog(playerid125DIALOG_STYLE_PASSWORD"Login Account",string,"Login","Kick");
      }
    }
    if (!
udb_Exists(PlayerName2(playerid)))
    {
      if(
PlayerInfo[playerid][Registered] == 0)
      {
          new 
string[200];
          
format(stringsizeof(string),""cwhite"Welcome "cred"%s "cwhite"To Call Of Duty Wolrd At War\nYour Account is not Registered!\nEnter your Password Below To Save Your Status\n(Score,Cash,Ranks,Kill,etc)"PlayerName2(playerid));
          
ShowPlayerDialog(playerid126DIALOG_STYLE_PASSWORD"Register Account",string,"Register","Kick");
      }
    }
    if(
PlayerInfo[playerid][LoggedIn] == 1)
    {
        new 
pname[128];
        new 
file[128];
        
GetPlayerName(playeridpnamesizeof(pname));
        
format(filesizeof(file), savefolder,pname);
        if(!
dini_Exists(file))
        {
            
dini_Create(file);
            
dini_IntSet(file"Score"0);
            
dini_IntSet(file"Money"0);
            
SetPlayerScore(playeriddini_Int(file"Score"));
            
SetPlayerMoney(playeriddini_Int(file"Money"));
        }
        else
        {
            
SetPlayerScore(playeriddini_Int(file"Score"));
            
SetPlayerMoney(playeriddini_Int(file"Money"));
        }
    } 
Ok, and what's your OnDialogResponse for the login dialog?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)