hi,
first thx so much for ur answer, i didnt expect, that someone is going to write a whole script for me

And i dont think that there are players that will be 24h on my server

I dont want that the played time is gonna get displayed to the player with the gametext function but with a cmd.
E.g if u type in /time it will say: Player x has played x time. (with sendclientmessage)
And id like to save this.
Ive got a register system that already saves score, kills, deaths, and money and the saveable time would be great!!
I save my things like this:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"%s.datei",pname);
if(fexist(accFormat) && Player[playerid][loggedin])
{
dini_IntSet(accFormat,"Kills",kills[playerid]);
dini_IntSet(accFormat,"Deaths",deaths[playerid]);
dini_IntSet(accFormat,"Money",GetPlayerMoney(playerid));
dini_IntSet(accFormat,"Score",GetPlayerScore(playerid));
//this is how the score ect. is displayed
// onplayercommandtext:
if(strcmp(cmdtext,"/stats",true)==0)
{
SendClientMessage(playerid, 0xFFFF00AA, "/////////////////////////////////////////////////////////");
new Float:ratio=floatdiv(kills[playerid], kills[playerid]);
new s[50];
format(s,sizeof(s),"Kills: %d | Deaths: %d | Ratio: %0.2f",kills[playerid],kills[playerid],ratio);
SendClientMessage(playerid,0xFFFF00AA,s);
new r[50];
format(r,sizeof(r),"Score: %d | Money: %d$",GetPlayerScore(playerid),GetPlayerMoney(playerid));
SendClientMessage(playerid,0xFFFF00AA,r);
SendClientMessage(playerid, 0xFFFF00AA, "/////////////////////////////////////////////////////////");
Do i have to save each variable (hours,minutes,seconds) seperate or is it possible to save it as "one thing".
And in the OnPLayerCommand function do i have just to put these (onlinehours,onlineminutes,onlineseconds)
variables into the brackets to get them displayed?
Sorry, my english is very bad. I hope u are able to understand me
Ps: @ powerscripters like veyron: i dont want to take ur whole time to get a script code done for me, its very helpful for beginners like me but if u dont want to post such much work im also happy about just some examples
regards and thx a lot again