! - . . , , . , , , (, ) . !




 
VK: vk.com/sergey68

76890 - 1000,46860 - 500, 300
** V.I.P --> **

: (2)

1 8 8

  1. #1

      John Powell

    :
    :14.08.2019
    :11
    :0 [+/-] 

    (2)

    !

    ...


    PHP :
    main() { }

    //==============================================================================
    //include

    #include    <a_samp>
    #include    <fix>
    #include    <a_mysql>
    #include    <streamer>
    #include    <a_actor>
    #include    <dc_cmd>
    #include    <sscanf2>
    #include    <foreach>
    #include    <Pawn.Regex>
    #include    <crashdetect>

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

    #define    SERVER_NAME         "xxxxx RolePlay"
    #define    SERVER_MAP          "San Andreas"
    #define    SERVER_MODE         "xxxxx RP 0.1v"
    #define    SERVER_VERSION      "xxxxxx RP 0.1v"
    #define    SERVER_WEBSITE        "vk.com/xxxxxx-rp.com"
    #define    SERVER_LANGUAGE     "Russian/"

    //==============================================================================
    //MySQL

    #define    MYSQL_HOST    "xxxxxx"
    #define    MYSQL_USER    "xxxxxx"
    #define    MYSQL_PASS    ""
    #define    MYSQL_BASE    "xxxxxx"

    //==================================[]===================================
    //------------------------------[ ]-------------------------------

    #define    SCM    SendClientMessage
    #define    SCMTA  SendClientMessageToAll
    #define    SPD    ShowPlayerDialog
    #define    DSI    DIALOG_STYLE_INPUT
    #define    DSP    DIALOG_STYLE_PASSWORD
    #define    DSM    DIALOG_STYLE_MSGBOX
    #define    DSL    DIALOG_STYLE_LIST
    #define    PN     player_info
    //-------------------------------[ ]--------------------------------

    #define    COLOR_WHITE    0xFFFFFFFF
    #define    COLOR_GREY     0xAFAFAFFF
    //==============================================================================

    //=================================[]=================================
    new MySQLdbHandle;

    enum player
    {
        
    ID,
        
    NAME[MAX_PLAYER_NAME],
        
    PASSWORD[65],
        
    SALT[11],
        
    EMAIL[64],
        
    SEX,
        
    SKIN,
        
    REGDATA[12],
        
    REGIP[16],
    }

    enum dialogs
    {
        
    DLG_NONE,
        
    DLG_REG,
        
    DLG_LOG,
        
    DLG_REGEMAIL,
        
    DLG_REGSEX,
        
    DLG_RACE
    }

    new 
    player_info[MAX_PLAYERS][player];

    new 
    gRandomM[4] = {26,35,142,262}; 
    new 
    gRandomF[3] = {65,69,193};
    //==============================================================================

    public OnGameModeInit()
    {
        
    SetGameModeText(""SERVER_MODE"");
        
    SendRconCommand("hostname "SERVER_NAME"");
        
    SendRconCommand("mapname "SERVER_MAP"");
        
    SendRconCommand("weburl "SERVER_WEBSITE"");
        
    SendRconCommand("language "SERVER_LANGUAGE"");
        
    SetGameModeText(SERVER_VERSION);
        
    ManualVehicleEngineAndLights();
        
    EnableStuntBonusForAll(0);
        
    DisableInteriorEnterExits();
        
    ConnectMySQL();
        
    AddPlayerClass(0,1225.7109,-1815.1077,16.5938,223.0721,0,0,0,0,0,0);
    //==============================================================================
    //3D 

        
    Create3DTextLabel("  ..."COLOR_WHITE1225.7443,-1814.5817,16.593830.001);

    //==============================================================================
        
    return 1;
    }

    public 
    OnGameModeExit()
    {
        return 
    1;
    }

    public 
    OnPlayerRequestClass(playeridclassid)
    {
        return 
    1;
    }

    public 
    OnPlayerConnect(playerid)
    {
        
    PN[playerid][SKIN] = 0;
        
    TogglePlayerSpectating(playerid1);
        
    GetPlayerName(playeridplayer_info[playerid][NAME], MAX_PLAYER_NAME);
        static const 
    fmt_query[] = "SELECT `id` FROM `users` WHERE `name` = '%s'";
        new 
    query[sizeof(fmt_query)+(-2+MAX_PLAYER_NAME)];
        
    format(querysizeof(query), fmt_queryplayer_info[playerid][NAME]);
        
    mysql_tquery(dbHandlequery"CheckRegistration""i"playerid);
        return 
    1;
    }

    public 
    OnPlayerDisconnect(playeridreason)
    {
        return 
    1;
    }

    public 
    OnPlayerSpawn(playerid)
    {
        
    SetPlayerSkin(playeridplayer_info[playerid][SKIN]);
        
    AddPlayerClass(PN[playerid][SKIN],1225.7109,-1815.1077,16.5938,223.0721,0,0,0,0,0,0);
        return 
    1;
    }

    public 
    OnPlayerDeath(playeridkilleridreason)
    {
        return 
    1;
    }

    public 
    OnPlayerText(playeridtext[])
    {
        return 
    1;
    }

    public 
    OnPlayerCommandText(playeridcmdtext[])
    {
        return 
    0;
    }

    public 
    OnDialogResponse(playeriddialogidresponselistiteminputtext[])
    {
        switch(
    dialogid)
        {
            case 
    DLG_REG:
            {
                if(
    response)
                {
                    if(!
    strlen(inputtext))
                    {
                        
    ShowRegistration(playerid);
                    }
                    
    //if(!(8 <= strlen(inputtext) <= 20))
                    
    if(strlen(inputtext) < || strlen(inputtext) > 20)
                    {
                        
    ShowRegistration(playerid);
                    }
                    new 
    regex:rg_passwordcheck regex_new("^[a-zA-Z0-9]{1,}$");
                    if(
    regex_check(inputtextrg_passwordcheck))
                    {
                        new 
    salt[11];
                        for(new 
    i<10i++)
                        {
                            
    salt[i] = random(79) + 47;
                        }
                        
    salt[10] = 0;
                        
    SHA256_PassHash(inputtextsaltplayer_info[playerid][PASSWORD], 65);
                        
    strmid(PN[playerid][SALT], salt01111);
                        
    //printf("%s", PN[playerid][SALT]);
                        //strmid(player_info[playerid][PASSWORD], inputtext, 0, strlen(inputtext), 20);
                        
    SPD(playeridDLG_REGEMAILDSI"{cdeb1f}E-mail {FFFFFF}|  2/3",
                        
    "{FFFFFF}  E-mail \n     ,    e-mail    ",
                        
    "{FFFFFF}""");
                    }
                    else
                    {
                        
    ShowRegistration(playerid);
                        
    regex_delete(rg_passwordcheck);
                    }
                }
                else
                {
                    
    SCM(playeridCOLOR_WHITE"    : '/q(uit)'");
                    
    SPD(playerid, -10" "" "" """);
                    return 
    Kick(playerid);
                }
            }
            case 
    DLG_REGEMAIL:
            {
                if(!
    strlen(inputtext))
                {
                     
    SPD(playeridDLG_REGEMAILDSI"{cdeb1f}E-mail {FFFFFF}|  2/3",
                     
    "{FFFFFF}  E-mail \n     ,    e-mail    ",
                     
    "{FFFFFF}""");
                }
                new 
    regex:rg_emailcheck regex_new("^([-A-Za-z0-9_]+\\.)*[-A-Za-z0-9_]+@([A-Za-z0-9][-A-Za-z0-9]*\\.)+[A-Za-z]{2,6}$");
                if(
    regex_check(inputtextrg_emailcheck))
                {
                    
    strmid(player_info[playerid][EMAIL], inputtext0strlen(inputtext), 64);
                    
    SPD(playeridDLG_REGSEXDIALOG_STYLE_MSGBOX"{cdeb1f}  {FFFFFF}|  3/3""{FFFFFF}   :\n- \n- """"");
                }
                else
                {
                     
    SPD(playeridDLG_REGEMAILDSI"{cdeb1f}E-mail {FFFFFF}|  2/3",
                     
    "{FFFFFF}  E-mail \n     ,    e-mail    ",
                     
    "{FFFFFF}""");
                }
                
    regex_delete(rg_emailcheck);
            }
            case 
    DLG_REGSEX:
            {
                if(
    response)
                {
                    
    PN[playerid][SEX] = 1;
                    new 
    RandomM random(sizeof(gRandomM));
                    
    SetPlayerSkin(playerid,gRandomM[RandomM]);
                    
    PN[playerid][SKIN] = gRandomM[RandomM];
                }
                else
                {
                    
    PN[playerid][SEX] = 2;
                    new 
    RandomF random(sizeof(gRandomF));
                    
    SetPlayerSkin(playerid,gRandomF[RandomF]);
                    
    PN[playerid][SKIN] = gRandomF[RandomF];
                }
                
    SpawnPlayer(playerid);
                
    TogglePlayerSpectating(playerid0);
                
    SCM(playeridCOLOR_WHITE" ");
                new 
    YearMonthDay;
                
    getdate(YearMonthDay);
                new 
    date[12];
                
    format(datesizeof(date), "%02d.%02d.%d"DayMonthYear);
                new 
    ip[16];
                
    GetPlayerIp(playeridipsizeof(ip));
                static const 
    fmt_query[] = "INSERT INTO `users` (`name`,`password`, `salt`, `email`, `sex`, `skin`, `regdata`, `regip`) VALUES ('%s', '%s', '%s', '%s', '%d', '%d', '%s', '%s')";
                new 
    query[sizeof(fmt_query)+(-2+MAX_PLAYER_NAME)+(-2+64)+(-2+10)+(-2+65)+(-2+8)+(-2+1)+(-2+3)+(-2+12)+(-2+15)];
                
    format(querysizeof(query), fmt_queryPN[playerid][NAME], PN[playerid][PASSWORD], PN[playerid][SALT], PN[playerid][EMAIL], PN[playerid][SEX], PN[playerid][SKIN], dateip);
                
    mysql_query(dbHandlequery);
                static const 
    fmt_query2[] = "SELECT * FROM `users` WHERE `name` = '%s' AND `password` = '%s'";
                
    format(querysizeof(query), fmt_query2PN[playerid][NAME], PN[playerid][PASSWORD]);
                
    mysql_tquery(dbHandlequery"PlayerLogin""i"playerid);
                   
    SetPVarInt(playerid"Logged"1);
            }
            case 
    DLG_LOG:
            {
                 if(
    response)
                 {
                      new 
    checkpass[65];
                      
    SHA256_PassHash(inputtextPN[playerid][SALT], checkpass65);
                      
    printf("%s\n%s"checkpassPN[playerid][SALT]);
                      if(
    strcmp(PN[playerid][PASSWORD], checkpassfalse64) == 0)
                     {
                         
    SCM(playeridCOLOR_WHITE" ");
                         
    TogglePlayerSpectating(playerid0);
                     }
                      else
                     {
                         
    SCM(playeridCOLOR_WHITE" ");
                         
    ShowLogin(playerid);
                     }
                 }
                 else
                 {
                      
    SCM(playeridCOLOR_WHITE"    : '/q(uit)'");
                      
    SPD(playerid, -10" "" "" """);
                      return 
    Kick(playerid);
                 }
            }
        }
        return 
    1;
    }

    forward PlayerLogin(playerid);
    public 
    PlayerLogin(playerid)
    {
        new 
    rows;
        
    cache_get_row_count(rows);
        if(
    rows)
        {
            
    cache_get_value_name_int(0"id"PN[playerid][ID]);
            
    cache_get_value_name(0"password"PN[playerid][PASSWORD], 65);
            
    cache_get_value_name(0"salt"PN[playerid][SALT], 11);
            
    cache_get_value_name(0"email"PN[playerid][EMAIL], 64);
            
    cache_get_value_name_int(0"sex"PN[playerid][SEX]);
            
    cache_get_value_name_int(0"skin"PN[playerid][SKIN]);
            
    cache_get_value_name(0"regdata"PN[playerid][REGDATA], 12);
            
    cache_get_value_name(0"regip"PN[playerid][REGDATA], 15);

            
    TogglePlayerSpectating(playerid0);
               
    SetPVarInt(playerid"Logged"1);
            
    SpawnPlayer(playerid);
        }
        return 
    1;
    }

    public 
    OnPlayerClickPlayer(playeridclickedplayeridsource)
    {
        return 
    1;
    }

    forward CheckRegistration(playerid);
    public 
    CheckRegistration(playerid)
    {
       new 
    rows;
       
    cache_get_row_count(rows);
       if(
    rows)
       {
           
    cache_get_value_name(0"password"PN[playerid][PASSWORD], 65);
           
    cache_get_value_name(0"salt"PN[playerid][SALT], 11);
           
    cache_get_value_name_int(0"skin"PN[playerid][SKIN]);
           
    ShowLogin(playerid);
       }
       else 
    ShowRegistration(playerid);
    }

    stock ConnectMySQL()
    {
        
    dbHandle mysql_connect(MYSQL_HOSTMYSQL_USERMYSQL_PASSMYSQL_BASE);
        switch(
    mysql_errno())
        {
            case 
    0: print("[MySQL] MySQL connection: FALSE\n");
            default: print(
    "[MySQL] MySQL connection: TRUE\n");
        }
        
    mysql_log(ERROR WARNING);
        
    mysql_set_charset("cp1251");
    }

    stock ShowRegistration(playerid)
    {
       new 
    dialog[370+(-2+MAX_PLAYER_NAME)];
       
    format(dialogsizeof(dialog),
       
    "{FFFFFF}   Lanix Role Play\n\n : %s\n {FFFFFF} : {e63034} {ffffff}\n\n    ''\n\n\
          ."
    ,
         
    PN[playerid][NAME]
         );
       
    SPD(playeridDLG_REGDSI"{FFFFFF} {FFFFFF}|  1/3"dialog"""");
    }

    stock ShowLogin(playerid)
    {
       new 
    dialog[270+(-2+MAX_PLAYER_NAME)];
       
    format(dialogsizeof(dialog),
       
    "{FFFFFF}   Lanix Role Play\n\n : %s\n {FFFFFF} : {21e14d}{ffffff}\n\n    ''\n",
       
    PN[playerid][NAME]);
       
    SPD(playeridDLG_LOGDSI"{FFFFFF}"dialog"""");

    Djon_Brain; 11.09.2019 13:10.
  2. #2

      me0w

    :
    :26.12.2018
    :Ukraine
    :162
    :18 [+/-] 
    mysql log
    !
  3. #3

      John Powell

    :
    :14.08.2019
    :11
    :0 [+/-] 

    mysql log
    PHP :
    [22:11:13] [WARNINGmysql_connectno password specified
    [22:11:17] [ERRORCConnection::CConnection establishing connection to MySQL database failed#2003 'Can't connect to MySQL server on 'localhost' (10061)'
    [22:11:21] [ERRORCConnection::CConnection establishing connection to MySQL database failed#2003 'Can't connect to MySQL server on 'localhost' (10061)'
    [22:11:25] [ERRORCConnection::CConnection establishing connection to MySQL database failed#2003 'Can't connect to MySQL server on 'localhost' (10061)'
    [22:11:29] [ERRORCConnection::CConnection establishing connection to MySQL database failed#2003 'Can't connect to MySQL server on 'localhost' (10061)'
    [22:15:37] [WARNINGmysql_connectno password specified
    [22:16:39] [WARNINGmysql_connectno password specified
    [22:19:55] [ERROR-T
    [22:29:12] [WARNINGmysql_connectno password specified
    [22:29:27] [ERROR]  X
    [22:31:11] [WARNINGmysql_connectno password specified
    [22:37:47] [WARNINGmysql_connectno password specified
    [22:38:52] [ERROR] *|
    [
    22:42:27] [WARNINGmysql_connectno password specified
    [22:43:06] [ERROR] ` 


    PHP :
    [22:15:40] [INFOreceived Windows console close eventshutting log-core down
    [22:29:07] [INFOreceived Windows console close eventshutting log-core down
    [22:31:09] [INFOreceived Windows console close eventshutting log-core down
    [22:37:42] [INFOreceived Windows console close eventshutting log-core down
    [22:42:25] [INFOreceived Windows console close eventshutting log-core down
    [23:51:32] [INFOreceived Windows console close eventshutting log-core down

    [22:43:06] [plugins/mysql] ` 
    Serg_Brain; 14.09.2019 12:54.
  4. #4

      KrYpToDeN

    :
    :29.03.2012
    :229
    :32 [+/-] 
    .
    :
    CConnection - establishing connection to MySQL database failed: #2003 'Can't connect to MySQL server on 'localhost' (10061)'

    :
    no password specified

    .

    ---------- 04:34 ---------- 04:33 ----------

    , :
    PHP :
    #define MYSQL_PASS "" 
  5. #5

      me0w

    :
    :26.12.2018
    :Ukraine
    :162
    :18 [+/-] 
    .
    :
    CConnection - establishing connection to MySQL database failed: #2003 'Can't connect to MySQL server on 'localhost' (10061)'

    :
    no password specified

    .

    ---------- 04:34 ---------- 04:33 ----------

    , :
    PHP :
    #define MYSQL_PASS "" 
    , "no password specified" , .

    server-log, - .
    me0w; 11.09.2019 08:52. : upd
    !
  6. #6

      John Powell

    :
    :14.08.2019
    :11
    :0 [+/-] 

    , "no password specified" , .

    server-log, - .
  7. #7

      me0w

    :
    :26.12.2018
    :Ukraine
    :162
    :18 [+/-] 
    Establishing connection to MySQL database failed: #2003 'Can't connect to MySQL server
    , :

    MySQL: # 2003 ' MySQL
    !
  8. #8

, : 17

(, , , , , ), , .
!
samp-rp advanvce pawn s0beit cs 1.6 0.3x World of Tanks samp-rp, samp-rp, - PAWNO SA-MP IV-MP MTA cleo s0beit sobeit sa-mp sa-mp pawno pawno pawno iv-mp iv-mp iv-mp godfather SAMP gta 4 4 GTA 4 GTA 4 GTA 4 SAMP SAMP Pen1 LS Pen1 Fugitive The Godfather rp roleplay samp-rp sa-mp sa-mp pawno gta-iv gta-v gta-sa gta-3 gta-III gta-4 gta-5 gta-vc mta mta-dm mta-race mta-sa pawno info ru pawno pawno gta-iv gta-iv gta-v gta-v gta-iv keygen gta sa gta 4 multiplayer gta san adnreas multiplayer sa-mp forum sa-mp pawno sa-mp pawno sa-mp gta-sa pawno pawno errors sa-mp 0.3c SA-MP 0.3d 4 GTA 4 GTA 4 GTA 4 SAMP SAMP Pen1 LS Pen1 Fugitive The Godfather SAMP hack rat android instagram twitter ddos root linux ubuntu mac android advance arizona 4g