19.06.2015, 13:01
I think this should work.
PHP код:
stock GetPlayerConnectedTime(playerid, &hours, &minutes, &seconds)
{
new connected_time = NetStats_GetConnectedTime(playerid);
seconds = (connected_time / 1000) % 60;
minutes = (connected_time / (1000 * 60)) % 60;
hours = (connected_time / (1000 * 60 * 60));
return true;
}
CMD:Example(params, []) // Just an example,. the syntax is wrong so just use your own command
{
new hours, minutes, seconds;
new string[64];
GetPlayerConnectedTime(playerid, hours, minutes, seconds);
format(string, sizeof(string), "You've been online for : %d Hours, %d Minutes and %d Seconds!", hours, minutes, seconds);
SendClientMessage(playerid, -1, string);
}