exactly time shower on timeleft..
#1

hey again..

sorry about the 2 posts in 10 min.. lol.. no really sorry..

ok.. what i wanna do is when player is finishing his job it will tell him "you finished please come back in (*XX Minutes*)"

and always if the player will try to do the job again it will tell him the exactly time that he need to wait.

like "you need to wait more 26 minutes"

yeah.. like a countdown.

thank you very mach!
Reply
#2

Use SetTimerEx

https://sampwiki.blast.hk/wiki/SetTimerEx
Reply
#3

Check this:

I use it too.

http://forum.sa-mp.com/index.php?top...9227#msg949227
Reply
#4

Thanks Jeff, never thought about something like that. I'll sure use it ^^
Reply
#5

you could create one simple timer just like that...

pawn Код:
new jobTime[MAX_PLAYERS];
pawn Код:
public OnGameModeInit()
{
  SetTimer("UpdateJob", 60000, 1);
  return 1;
}
pawn Код:
forward UpdateJob();
public UpdateJob()
{
  for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  {
    if(jobTime[i] > 0) jobTime[i]--;
  }
}
pawn Код:
//When a player finishes his job set jobTime to whatever you want
jobTime[playerid] = 30; // Next job available in 30 minutes

new str[128];

if(jobTime[playerid] > 0)
{
  format(str, sizeof(str), "Please come back in %d minutes...", jobTime[playerid]);
  SendClientMessage(playerid, WHITE);
}
Reply
#6

⒮⒠⒱⒠⒩⒮⒯⒜⒭ dude you helped me twice and i already love ya! thanks man!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)