SA-MP Forums Archive
Help Launcher - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Launcher (/showthread.php?tid=608513)



Help Launcher - edwardluciano - 02.06.2016

Launcher unCheck password

When login is launcher will store in variable PassConn for check match pass in script
but bug bypass login

srry my english skill not good

VB Script
Quote:

Dim MySqlConn As New MySqlConnection
MySqlConn.ConnectionString = "server=localhost;user=root;password=root;database =sampsosa"
Dim READER As MySqlDataReader

Try
MySqlConn.open()
Dim Query As String
Query = "update sampsosa.players set LauncConn='1',PassConn='" & TextBox2.Text & "' where Name='" & TextBox1.Text & "'"
Dim Command = New MySqlCommand(Query, MySqlConn)
READER = Command.ExecuteReader
MessageBox.Show("Sucess")
MySqlConn.Close()
Catch ex As Exception
MessageBox.Show("UnSucess")
End Try
samp script
Quote:

public CheckPlayerLogin(playerid)
{
AntiDeAMX();
new name[MAX_PLAYER_NAME],query[128],passwort[35],passconn[128];
GetPlayerName(playerid,name,sizeof(name));
passconn = PlayerInfo[playerid][pPassConn];
mysql_escape_string(passconn,passwort,dbhandle);
format(query,sizeof(query),"SELECT * FROM players WHERE Name='%s' AND Password=MD5('%s')",name,passwort);
//mysql_function_query(dbhandle,query,true,"OnPlayer LauncherLogin","i",playerid);

if(strcmp(PlayerInfo[playerid][pPassConn],passwort, true ) == 0 ) <<---- if same pass of user
{