MySQL Help!!
#9

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);
Reply


Messages In This Thread
MySQL Help!! - by GamingTurf - 28.11.2011, 19:17
Re: MySQL Help!! - by GamingTurf - 28.11.2011, 19:36
Re: MySQL Help!! - by LoF - 28.11.2011, 19:52
Re: MySQL Help!! - by GamingTurf - 28.11.2011, 20:04
Re: MySQL Help!! - by LoF - 28.11.2011, 20:05
Re: MySQL Help!! - by Nodroz - 28.11.2011, 20:05
Re: MySQL Help!! - by Nodroz - 28.11.2011, 20:15
Re: MySQL Help!! - by GamingTurf - 28.11.2011, 20:23
Re: MySQL Help!! - by Nodroz - 28.11.2011, 20:28
Re: MySQL Help!! - by GamingTurf - 28.11.2011, 21:19

Forum Jump:


Users browsing this thread: 2 Guest(s)