Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Top Of Your Script
- new GameTimer;
- new GameMinutes = 4;
- new GameSeconds = 59;
- new Text:Textdraw3;
- //Under OnGameModeInit Or OnFilterScriptInit
- GameTimer = SetTimer("GameTime",1000,1);
- Textdraw3 = TextDrawCreate(280.000000, 417.000000, "~b~Time Left ~n~~r~ 00:00");
- TextDrawBackgroundColor(Textdraw3, 255);
- TextDrawFont(Textdraw3, 2);
- TextDrawLetterSize(Textdraw3, 0.410000, 1.400000);
- TextDrawColor(Textdraw3, -1);
- TextDrawSetOutline(Textdraw3, 1);
- TextDrawSetProportional(Textdraw3, 1);
- //Under OnGameModeExit Or OnFilterScriptExit
- KillTimer(GameTimer);
- //Any Where in u r script
- forward GameTime();
- public GameTime()
- {
- if(GameSeconds || GameMinutes)
- {
- GameSeconds--;
- if(GameSeconds <= -1)
- {
- GameMinutes--;
- GameSeconds=59;
- }
- new TimeString[256];
- format(TimeString,sizeof(TimeString),"~b~Time Left ~n~~r~ %02d:%02d",GameMinutes,GameSeconds);
- TextDrawSetString(Textdraw3,TimeString);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement