online time
#1

I was surfing around forums, I couldn't really find anything for what I exactly wanted.

I wonder I have this piece of code here (a part of my stats cmd)

Код:
		 format(iString,sizeof(iString),"{ffff99}Online Time:");
		 SendClientMessage(playerid, -1, iString);
	}
 	return 1;
}
I was wondering how do I get the player's online time? (not total)
Reply
#2

maybe

under onplayerconnect
PlayerConnectedTime[playerid] = gettime();

use example (you get the results in seconds)
if((gettime() - PlayerConnectedTime[playerid]) > 3600)
SendClientMessage(playerid, -1, "You connected more than 1 hour!");
Reply
#3

I figured by my self, thanks tho!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)