SA-MP Forums Archive
more help with gRoundTimer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: more help with gRoundTimer (/showthread.php?tid=49915)



more help with gRoundTimer - whooper - 06.09.2008

pawn Код:
forward lol();
public lol(){
  new string2[128];
 for(new i=0; i<MAX_PLAYERS; i++ ) {
        format(string2, sizeof(string2), "There is currently %d left in the round ",gRoundTime);
        SendClientMessage(i, LIGHTGREEN,string2);
        }
       
        }
it just keeps sayign 900000,also how would i change it to secs instead of pawno secs


Re: more help with gRoundTimer - whooper - 06.09.2008

how would i get the current time so i can tell them how much longer like Gettime or something?


Re: more help with gRoundTimer - ғαιιοцт - 06.09.2008

http://asf. sterio.nl/wiki/wiki/Gettime.html (don't know why he censores the link so just remove the space)

edit: sorry wrong link


Re: more help with gRoundTimer - whooper - 06.09.2008

nice link doesnt even work

oh yeah i went to test it but it keeps saying the same thing like

9000000


Re: more help with gRoundTimer - Nero_3D - 06.09.2008

maybe try it with a bit mathe, you have the seconds how to get the minutes
pawn Код:
forward lol();
public lol()
{
    new string[128];
    new Time = gRoundTime / 1000;
    new Minutes = Time / 60;
    new Seconds = Time - Minutes * 60;
    format(string, sizeof(string), "There is currently %d:%d left in the round ", Minutes, Seconds);
    for(new i = 0, m = GetMaxPlayers(); i < m; i++) if(IsPlayerConnected(i)) SendClientMessage(i, LIGHTGREEN, string);
}



Re: more help with gRoundTimer - ғαιιοцт - 06.09.2008

Quote:
Originally Posted by whooper
nice link doesnt even work

oh yeah i went to test it but it keeps saying the same thing like

9000000
sorry, i edited (the forum deletes parts of my link when i post it :S)


Re: more help with gRoundTimer - whooper - 06.09.2008

so this?

also i got errors with gTimeLeft so would it be right if i did

pawn Код:
new; gTimeLeft
pawn Код:
forward Decrease_gTimeLeft();
public Decrease_gTimeLeft()
{
  gTimeLeft = gTimeLeft - 1;
  if(gTimeLeft == 0)
  {
    new string[128];
new Time1 = gRoundTime / 1000;
new Minutes = Time1 / 60;
new Seconds = Time1 - Minutes * 60;
format(string, sizeof(string), "There is currently %d:%d left in the round ", Minutes, Seconds);
for(new i = 0, m = GetMaxPlayers(); i < m; i++) if(IsPlayerConnected(i)) SendClientMessage(i, LIGHTGREEN, string);
  }
}



Re: more help with gRoundTimer - ғαιιοцт - 06.09.2008

you should change

Код:
new; gTimeLeft
to

Код:
new gTimeLeft;



Re: more help with gRoundTimer - whooper - 06.09.2008

its liek that on my script i guess there is a error with [pawn]


Re: more help with gRoundTimer - ғαιιοцт - 06.09.2008

maybe we can help? post the errors and the error lines