Score / Time Problem!
#1

Код:
TotalGameTime(playerid, &h=0, &m=0, &s=0)
{
    PlayerInfo[playerid][TotalTime] = ( (gettime() - PlayerInfo[playerid][ConnectTime]) + (PlayerInfo[playerid][hours]*60*60) + (PlayerInfo[playerid][mins]*60) + (PlayerInfo[playerid][secs]) );

    h = floatround(PlayerInfo[playerid][TotalTime] / 3600, floatround_floor);
    m = floatround(PlayerInfo[playerid][TotalTime] / 60,   floatround_floor) % 60;
    s = floatround(PlayerInfo[playerid][TotalTime] % 60,   floatround_floor);

    return PlayerInfo[playerid][TotalTime];
}
http://prntscr.com/hoawbd

command /stats:
Код:
	   format(string,sizeof string,"{ff4d4d}Stats of %s\n\n{FFFFFF}Registered: %s\nLoggedIn: %s\nAdmin Level: %d\nScore: %d\nTime: %d hrs %d mins %d secs\nPing: %d\nCountry: %s\
	   \n\n{33AA33}Cash: $%d\nBank: $%d\n\n{FFFFFF}Skin: %d\nWanted level: %d\n\n{FFFF00}Kills and Deaths\n{FFFFFF}Kills: %d\nDeaths: %d\nRatio: %f",
	   pName(playerid),Registered1,LoggedIn1,PlayerInfo[playerid][Level],GetPlayerScore(playerid),h,m,s,GetPlayerPing(playerid),GetPlayerCountryName(playerid),
Код:
	format(string,sizeof string,"{ff4d4d}Stats of %s\n\n{FFFFFF}Registered: %s\nLoggedIn: %s\nAdmin Level: %d\nScore: %d\nTime: %d hrs %d mins %d secs\nPing: %d\nCountry: %s\
	\n\n{33AA33}Cash: $%d\nBank: $%d\n\n{FFFFFF}Skin: %d\nWanted level: %d\n\n{FFFF00}Kills and Deaths\n{FFFFFF}Kills: %d\nDeaths: %d\nRatio: %0.2f",
	pName(player1),Registered1,LoggedIn1,PlayerInfo[player1][Level],GetPlayerScore(player1),h,m,GetPlayerPing(player1),GetPlayerCountryName(player1),
Need to put into /stats only Time played: Hours and Minutes + on scoreboard to put Hours od time played on server
Reply
#2

Its showing on scoreboard MINuTES!

I need to change it to hours

FullLoadAccounts:

Код:
     	SetPlayerScore(playerid,PlayerInfo[playerid][Time]);
Reply
#3

divide it by 60
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)