Jump to content

SUSANU

Membru
  • Posts

    42
  • Joined

  • Last visited

Posts posted by SUSANU

  1. Citat
    
    public OnPlayerLogin(playerid,password[])
    {
    	new playername2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername2, sizeof(playername2));
        //GameTextForPlayer(playerid, "~w~LOADING...~n~~y~CHECKING THE PASSWORD", 700, 3);
        new playerip[16];
    	GetPlayerIp(playerid,playerip,sizeof(playerip));
    	if(NumIp(playerip, playerid) >= 3 && !IsBotOnIP(playerip))
    	{
     		SendClientMessage(playerid, COLOR_LIGHTRED, "There are already 2 players connected with same IP.");
     		Kick(playerid);
     		return 1;
    	}
        new qstr[256];
        new MyHash[256];
        SHA256_PassHash(password, "78sdjs86d2h", MyHash, sizeof(MyHash));
        format(qstr,100,"SELECT * FROM users WHERE `name`='%s' AND `password`='%s'",playername2,MyHash);
        new Cache: pass = mysql_query(SQL,qstr);
        if(cache_get_row_count() > 0)

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.