Players online time in server H/M/S
#8

Quote:
Originally Posted by Tigerbeast11
Посмотреть сообщение
But I want to save it in the .ini file using y_ini

eg.

Код:
Name=Tigerbeast11
Password=HasedPassword
Cash=200
Hours On‌line=2
Minutes On‌line=34
So in this .ini file, the player has been online for 2 hours and 34 minutes.
Look up some Register/Login tutorial for Y_INI.

And then modify this:
pawn Код:
public OnPlayerLogin(playerid, password) //or connect.
{
    //If success:
    //Load the userfile...
    PlayerSeconds[playerid] = PlayerInfo[playerid][pSeconds]; //According to your variable.
    return true;
}
public OnPlayerDisconnect(playerid, reason)
{
    PlayerInfo[playerid][pSeconds] = PlayerSeconds[playerid];
    //Then save the userfile.
    return true;
}
Reply


Messages In This Thread
Players online time in server H/M/S - by maisto5 - 20.12.2010, 20:28
Re: Players online time in server H/M/S - by Tigerbeast11 - 31.08.2011, 17:18
Re: Players online time in server H/M/S - by Pinguinn - 31.08.2011, 17:19
Re: Players online time in server H/M/S - by MadeMan - 31.08.2011, 17:20
Re: Players online time in server H/M/S - by =WoR=Varth - 31.08.2011, 17:26
Re: Players online time in server H/M/S - by iPLEOMAX - 31.08.2011, 17:38
Re: Players online time in server H/M/S - by Tigerbeast11 - 31.08.2011, 18:13
Re: Players online time in server H/M/S - by iPLEOMAX - 31.08.2011, 18:39
Re: Players online time in server H/M/S - by Tigerbeast11 - 01.09.2011, 15:18

Forum Jump:


Users browsing this thread: 1 Guest(s)