20.10.2016, 08:05
hey sorry that I post alot of threads, I am just really intesnse to code this gamemode lol
How do I make a player freeze when he dies and make this timer to fill his hp? (roleplay mode)
like I set the camera on the hospital and wait to spawn the player for like 30 seconds filling his hp?
that's one..
2nd I made a time format, but it only calculates seconds and minutes, I want it to calculate hours and minutes
to implent a paycheck system..
this is my code:
how do I fix this?
thanks alot!
How do I make a player freeze when he dies and make this timer to fill his hp? (roleplay mode)
like I set the camera on the hospital and wait to spawn the player for like 30 seconds filling his hp?
that's one..
2nd I made a time format, but it only calculates seconds and minutes, I want it to calculate hours and minutes
to implent a paycheck system..
this is my code:
Код:
new Hour, Minute, timestring[6]; new Text:timetext; new Ztimer; Hour = 12; Minute = 00; Ztimer = SetTimer("timeupdate",1000,true); //////////////////////////////////////////////////////////////////////////////// timetext = TextDrawCreate(557.761962, 406.208618, "00:00"); TextDrawLetterSize(timetext, 0.314762, 1.066666); TextDrawAlignment(timetext, 1); TextDrawColor(timetext, -1); TextDrawSetShadow(timetext, 0); TextDrawSetOutline(timetext, 1); TextDrawBackgroundColor(timetext, 51); TextDrawFont(timetext, 1); TextDrawSetProportional(timetext, 1); forward timeupdate(); public timeupdate() { Minute += 01; if(Minute == 60 && Hour < 24) Hour += 01, Minute = 00; if(Hour == 24 && Minute == 00) Hour = 00, Minute = 00; format(timestring, sizeof(timestring), "%02d:%02d", Hour, Minute); TextDrawSetString(timetext,timestring); TextDrawShowForAll(timetext); TextDrawShowForAll(Text:Textdraw49); TextDrawShowForAll(Text:Textdraw50); for(new i = 0; i < MAX_PLAYERS; i++) { SetPlayerTime(i,Hour,Minute); } }
thanks alot!