Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
cache_insert_id()
Use in callback after insert query.
Posts: 436
Threads: 127
Joined: May 2014
Reputation:
0
Can someone show me the full code of this?
Posts: 2,593
Threads: 34
Joined: Dec 2007
You can load all in OnGameModeInit
top
new TotalUsers;
OnGameModeInit
mysql_query("SELECT COUNT(*) FROM playerdata");
TotalUsers = mysql_fetch_int
mysql_free_result
and when new player is register
TotalUsers++;
format(str,sizeof(str),"total users: %d",TotalUsers);
SCMToAll
Posts: 436
Threads: 127
Joined: May 2014
Reputation:
0
If the server is restarted,is it gonna reset the value?
Posts: 2,593
Threads: 34
Joined: Dec 2007
No because its doing again
mysql_query("SELECT COUNT(*) FROM playerdata");
TotalUsers = mysql_fetch_int
mysql_free_result