04.04.2014, 06:42
Hi..
I really can't describe the problem, so I recorded a video. Here it is:
http://www.youtube.com/watch?v=57a8M...ature=*********
It skips 30 seconds everytime..
Here's the code:
I took this map switching system from The Renaissance project by vasillis.
I really can't describe the problem, so I recorded a video. Here it is:
http://www.youtube.com/watch?v=57a8M...ature=*********
It skips 30 seconds everytime..
Here's the code:
pawn Код:
// at the top
new GameMinutes =5;
new GameSeconds =30;
//-------------//
public MainTimer() // my own timer, updates every 1 second.
{
if(GameSeconds || GameMinutes) {
GameSeconds--;
if(GameSeconds <= -1) {
GameMinutes--;
GameSeconds=30;
}
new TimeString[128];
format(TimeString,sizeof(TimeString),"~b~%02d:%02d",GameMinutes,GameSeconds);
TextDrawSetString(Textdraw5,TimeString);
}
}
//---------------//
public NewRound(playerid) {
for(new i = 0; i < MAX_PLAYERS; i++)
{
SpawnPlayer(i);
switch(CurrentMap)
{
case 0:
{
SetPlayerInterior(i,0);
GameMinutes =5;
GameSeconds =30;
}
case 1:
{
SetPlayerInterior(i,0);
GameMinutes =5;
GameSeconds =30;
}
case 2:
{
SetPlayerInterior(i,0);
GameMinutes =5;
GameSeconds =30;
}
case 3:
{
SetPlayerInterior(i,0);
GameMinutes =5;
GameSeconds =30;
}
case 4:
{
SetPlayerInterior(i,0);
GameMinutes =5;
GameSeconds =30;
}
case 5:
{
SetPlayerInterior(i,0);
GameMinutes =5;
GameSeconds =30;
}
}
}
return 1;
}