Timer time left
#1

Hi

I've made a /jail command with a timer, and the jail time is saved in "playerinfo[playerid][jtime]" also i can load it
but i would like to make a /time cmd so the player can see how much time left before he quit the jail how can i do it?
Reply
#2

something like ...

Код HTML:
CMD:timeleft(playerid)
{
     new string[120];
     if(gLogged == 0) return 1; // Check if he is logged put your variable.
     if(IsPlayerJailed == 1) // Your variable that calls if a player is or not in jail.
     {
          format(string, sizeof(string), "Your jail time: %d", playerinfo[playerid][jtime]); // This %d is for secconds only
	  SCM(playerid, -1, string);
     }
}
Reply
#3

Is the remaining time counted in seconds or milliseconds?
Reply
#4

Quote:
Originally Posted by StR_MaRy
Посмотреть сообщение
something like ...

Код HTML:
CMD:timeleft(playerid)
{
     new string[120];
     if(gLogged == 0) return 1; // Check if he is logged put your variable.
     if(IsPlayerJailed == 1) // Your variable that calls if a player is or not in jail.
     {
          format(string, sizeof(string), "Your jail time: %d", playerinfo[playerid][jtime]); // This %d is for secconds only
	  SCM(playerid, -1, string);
     }
}
the guy wanted to know the remaining time, not the jail time iteself,
PHP код:
#define JAIL_TIRE 30000 //30 seconds
 
format(stringsizeof(string), "Your jail time: %d"JAIL_TIME playerinfo[playerid][jtime]); 
,

It's in milliseconds,
Reply
#5

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
the guy wanted to know the remaining time, not the jail time iteself,
PHP код:
#define JAIL_TIRE 30000 //30 seconds
 
format(stringsizeof(string), "Your jail time: %d"JAIL_TIME playerinfo[playerid][jtime]); 
,

It's in milliseconds,
ok budy thx but my script is the same and for me it works fine with timers from gangs WAr
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)