PDA

View Full Version : Timer Problem


enzulikeS
06/03/2018, 01:49 PM
https://imgur.com/a/gS9I5

the waiting to rolling text wont dissapear and the roulette wont start, here's the timer

public OneSecTimer( )
{
foreach(new i:Player)
{
if(RouletteInGame[i] == 1)
{
new newtext[24];
format(newtext, sizeof(newtext), "Balance: %d", GetPlayerMoney(i));
PlayerTextDrawSetString(i,CasinoDrawPlayer[i][0], newtext);
}
}
if(RouletteTime2 >= 1 && RouletteStatus == 1) RouletteTime2 --;
if(RouletteTime == 0 && RouletteStatus == 0) TextDrawSetString(CasinoDraw[11], "Waiting to rolling..."),RouletteStatus = 1,RouletteTime2 = 11,playtime = SetTimer("RouletteGame1", 1000, true);
if(RouletteTime >= 1)
{
RouletteTime --;
if(TotalBet == 0) return TextDrawSetString(CasinoDraw[11], "Waiting for bets..."),RouletteTime = 20;
new newtextt[24];
format(newtextt, sizeof(newtextt), "ROUND STARTS IN: 00:%d", RouletteTime);
TextDrawSetString(CasinoDraw[11], newtextt);
}
return 1;
}

PepsiCola23
06/03/2018, 02:10 PM
public OneSecTimer( )
forward OneSecTimer()

enzulikeS
06/03/2018, 02:53 PM
i have the forward too

PepsiCola23
06/03/2018, 03:03 PM
where

enzulikeS
06/03/2018, 04:00 PM
up to the public, i didnt posted it

v1k1nG
07/03/2018, 01:37 AM
It would be nice if you post how you call for this public function too.

enzulikeS
07/03/2018, 12:12 PM
forward OneSecTimer();
public OneSecTimer( )
{
foreach(new i:Player)
{
if(RouletteInGame[i] == 1)
{
new newtext[24];
format(newtext, sizeof(newtext), "Balance: %d", GetPlayerMoney(i));
PlayerTextDrawSetString(i,CasinoDrawPlayer[i][0], newtext);
}
}
if(RouletteTime2 >= 1 && RouletteStatus == 1) RouletteTime2 --;
if(RouletteTime == 0 && RouletteStatus == 0) TextDrawSetString(CasinoDraw[11], "Waiting to rolling..."),RouletteStatus = 1,RouletteTime2 = 11,playtime = SetTimer("RouletteGame2", 1000, true);/*playtime = SetTimer("RouletteGame1", 2000, true);*/
if(RouletteTime >= 1)
{
RouletteTime --;
if(TotalBet == 0) return TextDrawSetString(CasinoDraw[11], "Waiting for bets..."),RouletteTime = 20;
new newtextt[24];
format(newtextt, sizeof(newtextt), "ROUND STARTS IN: 00:%d", RouletteTime);
TextDrawSetString(CasinoDraw[11], newtextt);
}
return 1;
}