WriteIni compared to SQ_Lite

Started by Mötley, Apr 12, 2016, 03:58 PM

Previous topic - Next topic

Mötley

#15
Quote from: KAKAN on Apr 14, 2016, 05:29 AM
Quote from: Doom_Kill3R on Apr 13, 2016, 07:21 AMWhy wouldn't it get updated? It will.
Suppose, I made 900 kills, before that I had 200 kills. The webstats will still show 200, but the ingame will show 1100. Because it's not yet updated on the DB.
The only possible way I can think of is to use the RCON plugin made by @Kirollos
With that, we can keep a connection with the server and the webstats, then when a user goes to the webstats, he can see the online players as well as updated stats.

I have not adventured this far "Webstats" but could/couldnt you somehow do say webstats{kills etc} = stats[ player.ID ].Kills
Kind of in the aspect of

function CashIncrease(player, amount)
{
        stats[ player.ID ].Cash += amount;
     //Now we want the games built in Cash function to show the actual cash
        player.Cash = stats[ player.ID ].Cash;
}

I am more than likely 99.9 percent wrong as I know nothing about webstats Yet.

KAKAN

no, my thinking was somewhat different. I though of getting the kills using a command from a telnet client, then show the kills.
Which is something like:
function RCONCallback(id, command, args){
if( command == "stats" ) {...}
}
So, we would request the server to get the kills of that player, and if the player is not in the server, then we it would return null, from that, the PHP side will come to know that the player is not online, so his/her stats are up-to-date. Then the PHP would check the DB and get it. Sorry for RIP english
oh no