Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock ConvertTimeAFK(playerid,result_str[],length,size = sizeof(result_str))
- {
- result_str[0] = '\0';
- if (length > size) {
- length = size - 1;
- }
- if (length < 1) {
- return 0;
- }
- new seconds = PI[playerid][AFK_Time];
- new hours,minutes,sec;
- if(seconds > 3599){
- hours = (seconds/3600);
- minutes = (seconds/60) - (hours*60);
- sec = (seconds - ((hours*3600)+(minutes*60)));
- format(result_str, length, "%d:%02d:%02d",hours,minutes,sec);
- }
- else if(seconds > 59){
- minutes = seconds/60;
- sec = (seconds - (minutes*60));
- format(result_str, 10, "%d:%02d", minutes, sec);
- }
- else{
- format(result_str, 9, "%d сек", seconds);
- }
- strins(result_str, "На паузе: ", 0,10);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement