saving player time and weather
#4

I see.

What you need to do is load the time again, so:

PHP код:
stock LoadTime(playerid)
{
//if(pInfo[playerid][LoggedIn] == 1)
{
new 
string[100];
cache_get_value("time",pInfo[playerid][Time]); // cache get value will get the value from the mysql, loading it as a cache
SetPlayerTime(playerid,pInfo[playerid][Time], 0); //this then sets Time from the bit above. You can do the same with the weather, just add this:
/*cache_get_value("weather",pInfo[playerid][Weather]);
SetPlayerWeather(playerid,pInfo[playerid][Weather]);
*/
return 1;
}

And then once they are logged in properly, put: "LoadTime(playerid);" under that function. Let me know if it works. Sorry about indentation, on my phone
Reply


Messages In This Thread
saving player time and weather - by severance - 15.08.2018, 17:10
Re: saving player time and weather - by OMonger - 15.08.2018, 18:56
Re: saving player time and weather - by severance - 15.08.2018, 19:13
Re: saving player time and weather - by OMonger - 15.08.2018, 21:05
Re: saving player time and weather - by severance - 15.08.2018, 21:23
Re: saving player time and weather - by OMonger - 15.08.2018, 21:29
Re: saving player time and weather - by severance - 16.08.2018, 10:54

Forum Jump:


Users browsing this thread: 1 Guest(s)