14.01.2015, 23:05
(
Последний раз редактировалось Bondage; 17.01.2015 в 20:50.
)
Solved
new query[100], pname[24], pass[30];
GetPlayerName(playerid, pname, 24);
mysql_escape_string(inputtext , pass);
mysql_format(Connectionhandle, query, sizeof(query), "SELECT * FROM `playerdata` WHERE `password`= SHA1('%s') AND `user`='%s'", pass, pname);//change `password` to your password name.
new cache:result = mysql_query(MySQL, query);
if(cache_get_row_count() > 0)
{
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `` WHERE `user` = '%e' LIMIT 1",);
mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
}
cache_delete(result);
C:\Users\Prabin\Desktop\0.3z\gamemodes\TGR.pwn(28492) : warning 213: tag mismatch
C:\Users\Prabin\Desktop\0.3z\gamemodes\TGR.pwn(28499) : warning 213: tag mismatch
new cache:result = mysql_query(mysql, query);
cache_delete(result);
new query[100], pname[24], passw[30];
GetPlayerName(playerid, pname, 24);
mysql_escape_string(inputtext , passw);
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `playerdata` WHERE `password`= SHA1('%s') AND `user`='%e'", passw, pname);//change `password` to your password name.
new cache:result = mysql_query(mysql, query); //this line
if(cache_get_row_count() > 0)
{
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `playerdata` WHERE `user` = '%e' LIMIT 1",pname);
mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
}
cache_delete(result); //this line
new query[100], pname[24], pass[30];
new cache:result;
GetPlayerName(playerid, pname, 24);
mysql_escape_string(inputtext , pass);
mysql_format(Connectionhandle, query, sizeof(query), "SELECT * FROM `playerdata` WHERE `password`= SHA1('%s') AND `user`='%s'", pass, pname);//change `password` to your password name.
result = mysql_query(MySQL, query);
if(cache_get_row_count() > 0)
{
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `` WHERE `user` = '%e' LIMIT 1",);
mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
}
cache_delete(result);