Worldtime. - 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: Worldtime. (
/showthread.php?tid=140343)
Worldtime. -
DaHP14Y3R - 08.04.2010
Can anyone to tell me how to do like,
pawn Код:
OnGameModeInIt()
{
SetWorldTime(0);
return 1;
}
Time 00:00 ( Server Starts )
2 Minutes...
Time 01:00
2 Minutes...
Time 02:00
etc.
Like
wait2minplox;
worldTime ++;
wait2minplox;
worldTime ++;
Re: Worldtime. -
xCoder - 08.04.2010
pawn Код:
public OnGameModeInIt()
{
SetWorldTime(0);
SetTimer("mytimer",60*2*1000,1);
return 1;
}
forward mytimer();
public mytimer()
{
new min;
min++;
SetWorldTime(min);
}
Re: Worldtime. -
DaHP14Y3R - 08.04.2010
Quote:
Originally Posted by CoverH.ng
pawn Код:
public OnGameModeInIt() { SetWorldTime(0); SetTimer("mytimer",60*2*1000,1); return 1; }
forward mytimer(); public mytimer() { new min; min++; SetWorldTime(min); }
|
No errors but.
Код:
warning 219: local variable "min" shadows a variable at a preceding level
Re: Worldtime. -
biltong - 08.04.2010
Change every "min" in that bit of script to "min1"