28.11.2011, 20:28
Well, here are some lines from my script to login. You might can copy some stuff from it.
Код:
AvoidOOSync(); new id, playername[MAX_PLAYER_NAME],pass[50], money, score, banned, elite, kills, deaths, jailed, jailtimeleft, rank, muted, ip[20], registerdate[10], lastlogged[10], planesteals, drugsteals; mysql_format(MySqlConnection, query, "SELECT * FROM users WHERE Playername='%e'",GetName(playerid)); mysql_query(query); mysql_store_result(); mysql_fetch_row_format(result,"|"); sscanf(result,"p<|>is[50]iiiiiiiiiis[50]s[20]s[10]s[10]ii", id, playername, money, score, banned, elite, kills, deaths, jailed, jailtimeleft, rank, muted, pass, ip, registerdate, lastlogged, planesteals, drugsteals); AvoidOOSync(); new day; new month; new year; getdate(year, month, day); mysql_format(MySqlConnection,query,"UPDATE users SET LastLogged='%d/%d/%d', IP='%s' WHERE Playername='%e'",day,month,year,GetPVarStr(playerid,"IP"),GetName(playerid)); mysql_query(query);