Score / Time Problem! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Score / Time Problem! (
/showthread.php?tid=646390)
Score / Time Problem! -
tbedy - 16.12.2017
Код:
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
Re: Score / Time Problem! -
tbedy - 16.12.2017
Its showing on scoreboard MINuTES!
I need to change it to hours
FullLoadAccounts:
Код:
SetPlayerScore(playerid,PlayerInfo[playerid][Time]);
Re: Score / Time Problem! -
TakeiT - 16.12.2017
divide it by 60