A problem
#3

Here, Sir, Also my account isn't registered on DB and I see Login dialog box while I didnt register

pawn Код:
public OnPlayerConnect(playerid)
{
    new string [ 135 ];
   
    Initialize_PTD(playerid);
   
    GetPlayerIp(playerid, pInfo[playerid][IP], 16);
   
    KillTimer(Protection[playerid]);
   
    for (new x=0; x<MAX_WAR; x++)
    {
        InCP[playerid][x] = 0;
        Helping[playerid][x] = 0;
    }

    Initialize_WarFieldShow(playerid);
    Label[playerid] = CreateDynamic3DTextLabel("Blank", -1, 0.0, 0.0, -20, 25.0, playerid);
    Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, Label[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.30);
   
    SetPlayerColor(playerid, COLOR_GREY);
   
    ClearMe(playerid);
   
    LoggedIn[playerid] = 0; pInfo[playerid][Admin] = 0; pInfo[playerid][VIP] = 0; pInfo[playerid][Money] = 30000; pInfo[playerid][Scores] = 0;
    pInfo[playerid][Kills] = 0; pInfo[playerid][Deaths] = 0; gTeam[playerid] = -1; inClass[playerid] = 1; Capture[playerid] = 0; protect[playerid] = 0;
    Spawn[playerid] = 0; gClass[playerid] = 0; aDuty[playerid] = 0; pInfo[playerid][Rank] = 0; pInfo[playerid][pCar] = -1; Warn[playerid] = 0;
    HeadShot[playerid] = false; pInfo[playerid][pHelmet] = 0; takeZone[playerid] = -1; LastPM[playerid] = INVALID_PLAYER_ID; flagPlayer[playerid] = -1;
    flagPlayer2[playerid] = -1; pInfo[playerid][userid] = -1;

    format(string, sizeof(string), "[Connection] Player %s (ID: %d) has connected the server.", nameEx(playerid), playerid);
    SendClientMessageToAll(COLOR_GREY, string);

    SendClientMessage(playerid, -1, "Welcome to The World War III - "MINI_VERSION" for SAMP "SAMP_VERSION"");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Credits to ShadyEG and Bombo237 for scripting the main gamemode & it's running system.");
    SendClientMessage(playerid, COLOR_YELLOW, "Select a team you wish to be in, Once you are spawned, we will ask you which class would you like to choose.");

    new query[200];
    format(query, sizeof(query), "SELECT * FROM `users` WHERE `username` = '%s' LIMIT 1", nameEx(playerid));
    mysql_query(query);
    mysql_store_result();
    new rows = mysql_num_rows();
   
    if(rows)
    {
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, ""col_lb"Login", ""col_w"This account is registered to our database.\nInsert your password to login to your account.\n"col_r"If this is not your account, logged out and change your nickname.", "Login", "");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""col_lb"Register", ""col_w"This account is not registered to our database.\nEnter your own password to create a new account.", "Register", "");
    }
    mysql_free_result();
    return 1;
}
Reply


Messages In This Thread
A problem - by Shady - 24.05.2015, 18:49
Re: A problem - by kalanerik99 - 24.05.2015, 18:57
Re: A problem - by Shady - 25.05.2015, 11:29
Re: A problem - by Ghazal - 25.05.2015, 11:36
Re: A problem - by Shady - 25.05.2015, 12:05
Re: A problem - by MEW273 - 25.05.2015, 12:08
Re: A problem - by Shady - 25.05.2015, 12:21
Re: A problem - by MEW273 - 25.05.2015, 12:26
Re: A problem - by Shady - 25.05.2015, 12:33
Re: A problem - by Shady - 25.05.2015, 15:33
Re: A problem - by SoFahim - 25.05.2015, 15:38
Re: A problem - by Konstantinos - 25.05.2015, 15:54
Re: A problem - by M0HAMMAD - 25.05.2015, 16:01

Forum Jump:


Users browsing this thread: 2 Guest(s)