Nem tudom jó e, ezt találtam. forward conTimeTimer();
public conTimeTimer() {
foreach(Player, x) {
SetPVarInt(x, \"playerTime\", GetPVarInt(x, \"playerTime\") + 1);
}
return 1;
}
CMD:timespent(playerid, params[]) {
new
szMessage[64];
switch(GetPVarInt(playerid, \"playerTime\")) {
case 0..59: {
format(szMessage, sizeof(szMessage), \"You have been online for: %d seconds.\", GetPVarInt(playerid, \"playerTime\"));
}
case 60..3599: {
format(szMessage, sizeof(szMessage), \"You have been online for: %d minutes.\", GetPVarInt(playerid, \"playerTime\") / 60);
}
case 3600..86399: {
format(szMessage, sizeof(szMessage), \"You have been online for: %d hours.\", GetPVarInt(playerid, \"playerTime\") / 60);
}
case 86400..604800: {
format(szMessage, sizeof(szMessage), \"You have been online for approximately %d days.\", GetPVarInt(playerid, \"playerTime\") / 60 / 60 / 24);
}
}
Link: http://forum.sa-mp.com/showthread.php?t=266893
Üdv. Keny