16.07.2011, 13:26
On very top
Under OnGameModeInit
--------------------------------------------------------------------------
Visual (author:Jeffry)
Very top
Under OnGameModeInit
pawn Код:
forward GMChange(playerid);
pawn Код:
SetTimer("GMChange",3000000,false); // 5 minutes
pawn Код:
public GMChange(playerid)
{
SendRconCommand("changemode YOURGMNAME");
return 1;
}
Visual (author:Jeffry)
Very top
pawn Код:
forward UpdateTime();
pawn Код:
new Time, TimeM, TimeS;
new Text:Timer;
pawn Код:
Timer = TextDrawCreate(550.000000, 30.000000, "5:00");
TextDrawFont(Timer, 3);
TextDrawLetterSize(Timer, 0.600000, 1.100000);
TextDrawSetOutline(Timer, 1);
TextDrawSetShadow(Timer, 0);
TimeM = 5;
TimeS = 0;
Time = SetTimer("UpdateTime", 1000, true);
pawn Код:
public UpdateTime()
{
new Str[34];
TimeS --;
if(TimeM == 0 && TimeS == 0)
{
KillTimer(Time);
}
if(TimeS == -1)
{
TimeM--;
TimeS = 59;
}
format(Str, sizeof(Str), "%02d:%02d", TimeM, TimeS);
TextDrawSetString(Timer, Str);
return 1;
}