[BUGGED] Password Logging
#1

On The First Topic Wesley And TheLazySloth
Has Solved my problem but yeah it compiles great
but the bug is still there i cant even login even the password is right.

Here is the first topic

https://sampforum.blast.hk/showthread.php?tid=290540

And Here is the link of tutorial (if needed):

http://forum.sa-mp.com/showthread.ph...ighlight=Y_INI

Here is some screenshot:

This is my register proof that it work
And i type correct password.



Here is my other proof that my register is successfully worked!



Here is my login bug. I type the password correctly if its not
then tell me



And Now here is our Lucky Bug



Please Help Me guys

UPDATE:
Ok i found out other serious weirdo bugs
i register then i reconnect i edit my scriptfiles/server/users
to Admin level 10 but when i login it gives me error
i go back to the scripts files the Admin Level = Restore to 0
All has been restore to 0

Here is the original details:

[DATA FILES]
Password = 187367946
Cash = 0
Score = 79913
Admin = 10
Kills = 7091
Deaths = 213

But The Admin System making them restore to 0 so it should be likes this

[DATA FILES]
Password = 187367946
Cash = 0
Score = 0
Admin = 0
Kills = 0
Deaths = 0

Here is the code if needed:

pawn Код:
//
//       Xtreme Admin System V1.0
//               Made By
//    [SP]Mr.Kakashi[WP] & GAMER_PS2
//        Copyright 2011 - 2016
//

#include <a_samp>
#include <YSI\y_ini>
#include <zcmd>
#include <sscanf2>
#include <XKA>

enum pInfo
{
    pPass,
    pCash,
    pScore,
    pAdmin,
    pKills,
    pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);

#define DIALOG_REGISTER 451
#define DIALOG_LOGIN 452

#define PATH "Server/Users/%s.ini"

//============================================================================//

#define red "{FF002B}"
#define pink "{FF00D9}"
#define purple "{DFA7F2}"
#define blue "{A1C2FF}"
#define green "{3DE3B1}"
#define yellow "{FAF623}"
#define black "{69670C}"
#define orange "{F2C80C}"
#define ice "{03F2FF}"
#define white "{FFFFFF}"
#define lime "{00FF40}"

#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xFF0000FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_VIOLET 0x9955DEEE
#define COLOR_LIGHTRED 0xFF99AADD
#define COLOR_SEAGREEN 0x00EEADDF
#define COLOR_GRAYWHITE 0xEEEEFFC4
#define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
#define COLOR_GREENISHGOLD 0xCCFFDD56
#define COLOR_LIGHTBLUEGREEN 0x0FFDD349
#define COLOR_NEUTRALBLUE 0xABCDEF01
#define COLOR_LIGHTCYAN 0xAAFFCC33
#define COLOR_LEMON 0xDDDD2357
#define COLOR_MEDIUMBLUE 0x63AFF00A
#define COLOR_NEUTRAL 0xABCDEF97
#define COLOR_BLACK 0x00000000
#define COLOR_NEUTRALGREEN 0x81CFAB00
#define COLOR_DARKGREEN 0x12900BBF
#define COLOR_LIGHTGREEN 0x24FF0AB9
#define COLOR_DARKBLUE 0x300FFAAB
#define COLOR_BLUEGREEN 0x46BBAA00
#define COLOR_PINK 0xFF66FFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_RED1 0xFF0000AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_TAN 0xFFFFCCAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_KHAKI 0x999900AA
#define COLOR_LIME 0x99FF00AA
#define COLOR_SYSTEM 0xEFEFF7AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD1 0xB4B5B7FF

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("        Xtreme Administration V1.0.0    ");
    print("            Made by Mr.Kakashi          ");
    print("          Copyright 2011 - 2016         ");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#endif

public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password", PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}

public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""white"Login",""red"Note:"white"If this is not your account please leave to this account and create your own one.\n\n"white"Type your password below to login to your account","Login","Exit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""white"Register",""red"Note:"white"If you crash ingame your account will be save.\n\n"white"Type the password below to create new account","Register","Exit");
    }
    if(PlayerInfo[playerid][pAdmin] >= 0)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 1)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Trial Moderator>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 2)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Moderator>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 3)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Global Moderator>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 4)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Trial Manager>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 5)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Tester>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 6)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Senior Administrator>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 7)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Junior Administrator>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 8)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Scripter/Mapper/Developer>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 9)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Co-Owner>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 10)
    {
       new string[64], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
       format(string,sizeof string,""red"<Server Owner>:"green"%s has joined the server",pName);
       SendClientMessageToAll(COLOR_GREY,string);
    }
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"DATA FILES");
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Score",GetPlayerScore(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Close(File);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""white"Register",""red"Note:"white"If you crash ingame your account will be save.\n\n"white"Type the password below to create new account","Register","Exit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"DATA FILES");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
                INI_WriteInt(File,"Score",GetPlayerScore(playerid));
                INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                INI_Close(File);

                SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
                SendClientMessage(playerid, COLOR_GREEN, "You have successfully register.");
            }
        }

        case DIALOG_LOGIN:
        {
            if (!response) return Kick (playerid);
            if(response)
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
                    SendClientMessage(playerid, COLOR_GREEN, "You have successfully login to your account.");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""white"Login",""red"You have entered an incorrect password.\n"white"Type your password below to login.","Login","Exit");
                }
                return 1;
            }
        }
    }
    return 1;
}

//==========================COMMANDS==========================//

CMD:get(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
       new targetid, string[128];
       if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /get <playerid/name>");
       if(!IsPlayerConnected(targetid) && targetid != INVALID_PLAYER_ID && targetid != playerid)
       {
           new AdminName[24];
           new pName[24];
           GetPlayerName(playerid,AdminName,128);
           GetPlayerName(targetid,pName,128);
           format(string, sizeof(string), "You have been teleported to Administrator %s.",AdminName);
           SendClientMessage(targetid,COLOR_BLUE,string);
           format(string, sizeof(string), "%s has been teleport to you.",pName);
           SendClientMessage(targetid,COLOR_GREEN,string);
           SetPlayerInterior(targetid,GetPlayerInterior(playerid));
           new Float:TPX, Float:TPY, Float:TPZ;
           GetPlayerPos(playerid, TPX, TPY, TPZ);
           SetPlayerPos(targetid, TPX, TPY, TPZ+1);
       }
       else return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected or its yourself.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "ERROR: You must be Administrator Level 2 to use this command");
    return 1;
}

CMD:kick(playerid, params[])
{
    new pid;
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        if(sscanf(params, "us[128]", pid, params[2])) return SendClientMessage(playerid,COLOR_RED, "USAGE: /kick <playerid/name> <reason>");
        if(!IsPlayerConnected(pid) && pid != INVALID_PLAYER_ID && pid != playerid)
        {
           new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
           GetPlayerName(pid, paramname, sizeof(paramname));
           GetPlayerName(playerid, adminname, sizeof(adminname));
           format(string, sizeof(string), "Administrator %s has kicked %s <Reason: %s>",adminname,paramname, params[2]);
           SendClientMessageToAll(COLOR_RED, string);
           format(string, sizeof(string), "You have been kicked by Administrator %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(pid,COLOR_RED, string);
           format(string, sizeof(string), "You kicked %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(playerid,COLOR_GREEN, string);
           Kick(pid);
        }
        else return SendClientMessage(playerid,COLOR_RED, "ERROR: Player is not connected or its yourself.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "ERROR: You must be Administrator Level 2 to use this command");
    return 1;
}

CMD:kill(playerid,params[])
{
    SetPlayerHealth(playerid, 0);
    PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
    PlayerInfo[playerid][pDeaths]++;
    return 1;
}

CMD:suicide(playerid,params[])
{
    SetPlayerHealth(playerid, 0);
    PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
    PlayerInfo[playerid][pDeaths]++;
    return 1;
}

CMD:asay(playerid, params[])
{
    new string[128], pname[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
       if(isnull(params)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /asay <text>");
       GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
       format(string, sizeof(string), "Admin %s :%s", pname, params);
       SendClientMessageToAll(COLOR_RED,string);
    }
    else return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be Administrator Level 1 to use this command");
    return 1;
}

CMD:forcerules(playerid, params[])
{
    new pid;
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        if(sscanf(params, "us[128]", pid, params[2])) return SendClientMessage(playerid,COLOR_RED, "USAGE: /forcerules <playerid/name> <reason>");
        if(!IsPlayerConnected(pid) && pid != INVALID_PLAYER_ID && pid != playerid)
        {
           new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
           GetPlayerName(pid, paramname, sizeof(paramname));
           GetPlayerName(playerid, adminname, sizeof(adminname));
           format(string, sizeof(string), "Administrator %s has force to read rules %s <Reason: %s>",adminname,paramname, params[2]);
           SendClientMessageToAll(COLOR_RED, string);
           format(string, sizeof(string), "You have been force to read rules by Administrator %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(pid,COLOR_RED, string);
           format(string, sizeof(string), "You force to read rules %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(playerid,COLOR_GREEN, string);
           ShowPlayerDialog(pid,3, DIALOG_STYLE_MSGBOX, "Rules:", "1.)Do Not Hack/Cheat/Mods\n2.)Respect Admins/Players\n3.)Ask To Be Admin if we are Hiring\n4.)No Insulting/Flamming\n5.)Dont AFK on Spawn Areas\n6.)Dont Team Carjack\n7.)Dont Team Kill\n\nIf you break those rules you may Punishment by Our Server Administrators", "Accept", "Ignore");
        }
        else return SendClientMessage(playerid,COLOR_RED, "ERROR: Player is not connected or its yourself.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "ERROR: You must be Administrator Level 2 to use this command");
    return 1;
}

//============================================================================//

stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}
Reply


Messages In This Thread
[BUGGED] Password Logging - by GAMER_PS2 - 16.10.2011, 09:48
Re: [BUGGED] Password Logging - by Wesley221 - 16.10.2011, 09:50
Re: [BUGGED] Password Logging - by GAMER_PS2 - 16.10.2011, 09:58
Re: [BUGGED] Password Logging - by Wesley221 - 16.10.2011, 09:59
Re: [BUGGED] Password Logging - by GAMER_PS2 - 16.10.2011, 10:04
Re: [BUGGED] Password Logging - by GAMER_PS2 - 16.10.2011, 11:45
Re: [BUGGED] Password Logging - by Scenario - 16.10.2011, 11:52
Re: [BUGGED] Password Logging - by GAMER_PS2 - 16.10.2011, 11:55
Re: [BUGGED] Password Logging - by GAMER_PS2 - 16.10.2011, 12:01
Re: [BUGGED] Password Logging - by GAMER_PS2 - 17.10.2011, 09:48

Forum Jump:


Users browsing this thread: 1 Guest(s)