Help With SetPlayerName
#3

part of what where i want it Okay..

pawn Код:
if (dialogid == 2)
    {
        new name[MAX_PLAYER_NAME], file[256], string[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), ARS_SERVERFILES, name);
        if(!response)
        {
            SendClientMessage( playerid, WHITE, "Fine, have it your way!" );
            Kick( playerid );
        }
        if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "This account is registered in our data base.", "Enter your password below, or leave if you're the wrong person", "Login", "Leave");
        new tmp;
        tmp = dini_Int(file, "Password");
        if(udb_hash(inputtext) != tmp) {
            SendClientMessage(playerid, RED, "..::Invalid password::..  Re-enter your password correctly or leave!");
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "This account is registered in our data base.", "Enter your password below, or leave if you're a wrong person", "Login", "Leave");
        }
        else
        {
            PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
            PlayerInfo[playerid][pJob] = dini_Int(file, "Job");
            SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
            GivePlayerMoney(playerid, dini_Int(file, "Money"));
            SetPlayerHealth(playerid, dini_Int(file, "Health"));
            SetPlayerArmour(playerid, dini_Int(file, "Armour"));
            format(string, 128, "You have succesfully logged into your account. %s, Welcome back.", name);
            SendClientMessage(playerid, DARKBLUE, string);
            SpawnLastSaved(playerid);
            PlayerOnline[playerid] = 1;
            SetPlayerName(playerid, PlayerInfo[playerid][pFirstname]);
        }
    }
Reply


Messages In This Thread
Help With SetPlayerName - by Buzzbomb - 03.10.2011, 19:00
Re: Help With SetPlayerName - by [L3th4l] - 03.10.2011, 19:14
Re: Help With SetPlayerName - by Buzzbomb - 03.10.2011, 19:39
Re: Help With SetPlayerName - by Buzzbomb - 03.10.2011, 20:40
Re: Help With SetPlayerName - by [L3th4l] - 03.10.2011, 20:53
Re: Help With SetPlayerName - by Buzzbomb - 03.10.2011, 21:04
Re: Help With SetPlayerName - by [L3th4l] - 03.10.2011, 21:14
Re: Help With SetPlayerName - by knackworst - 03.10.2011, 21:16
Re: Help With SetPlayerName - by Buzzbomb - 03.10.2011, 21:19
Re: Help With SetPlayerName - by [L3th4l] - 03.10.2011, 21:20

Forum Jump:


Users browsing this thread: 2 Guest(s)