[FilterScript] Game Mode Clock.
#1

Hello,Today i am boring So i made this Game Mode Clock.
This Is Simple But Great Game Mode Clock Like CBCNR.

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript

#include <a_samp>

#define MAX_WEATHER 9
new GameModeTimer;
new OnCommandList[MAX_PLAYERS];
new Text:Clock;
new Text:DaysOfWeek;
new GameDay = 0;
new GameHour = 0;
new GameMinute = 0;
new GameWeather = 0;
new RandomWeather[MAX_WEATHER][1] = {
	{1},
	{3},
	{9},
	{7},
	{2},
	{10},
	{5},
	{6},
	{4}
};

new WeekDays[7][] = {
	{"Monday"},
	{"Tuesday"},
	{"Wednesday"},
	{"Thursday"},
	{"Friday"},
	{"Saturday"},
	{"Sunday"}
};



public OnFilterScriptInit()
{
    Clock = TextDrawCreate(549.0, 24.0, "00:00");
	TextDrawLetterSize(Clock, 0.55, 2.0);
	TextDrawFont(Clock, 3);
	TextDrawBackgroundColor(Clock, 0x000000AA);
	TextDrawSetOutline(Clock, 2);
	
    DaysOfWeek = TextDrawCreate(549.0, 7.0, WeekDays[GameDay]);
	TextDrawAlignment(DaysOfWeek, 1);
	TextDrawBackgroundColor(DaysOfWeek, 0x000000FF);
	TextDrawFont(DaysOfWeek, 2);
	TextDrawLetterSize(DaysOfWeek, 0.2999, 1.2);
	TextDrawColor(DaysOfWeek, 0xFFFFFFFF);
	TextDrawSetOutline(DaysOfWeek, 1);
	TextDrawSetProportional(DaysOfWeek, true);
	TextDrawSetShadow(DaysOfWeek, 1);
    GameModeTimer = SetTimerEx("GameModeClock", 900, 1, "d", "d");
    print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    KillTimer(GameModeTimer);
	return 1;
}

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

forward GameModeClock();
public GameModeClock()
{
	new string[256],string2[128];

	GameMinute ++;

	if (GameMinute == 60)
	{
	GameMinute = 0;
	GameHour ++;
	SetWorldTime(GameHour);
	GameWeather ++;

	if (GameWeather == 3)
	{
	new weatherid = random(MAX_WEATHER);
	SetWeather(RandomWeather[weatherid][0]);
	GameWeather = 0;
	}

	}

	if (GameHour == 24)
	{
	GameMinute = 0;
	GameHour = 0;
	GameDay ++;
	}

	format(string, sizeof(string), "%s",WeekDays[GameDay]);
	TextDrawSetString(DaysOfWeek, string);

	if (GameHour < 10)
	format(string, sizeof(string), "0%d",GameHour);
	else
	format(string, sizeof(string), "%d",GameHour);

	if (GameMinute < 10)
	format(string, sizeof(string), "%s:0%d",string,GameMinute);
	else
	format(string, sizeof(string), "%s:%d",string,GameMinute);

	TextDrawSetString(Clock, string);


	if (GameHour < 10)
	format(string, sizeof(string), "%s, 0%d",WeekDays[GameDay],GameHour);
	else
	format(string, sizeof(string), "%s, %d",WeekDays[GameDay],GameHour);

	if (GameMinute < 10)
	format(string, sizeof(string), "%s:0%d",string,GameMinute);
	else
	format(string, sizeof(string), "%s:%d",string,GameMinute);


	if (GameMinute == 0)
	{
	format(string, sizeof(string), "%s",string);
	//printf(string);

	format(string2, sizeof(string2), "worldtime %s",string);
	SendRconCommand(string2);

	format(string, sizeof(string), "{FFFFFF}Game Time: {BDBDBD}%s",string);
	SendClientMessageToAll(-1, string);
	}
}
+REP if you like this.
Reply
#2

Nice job, i'll test it out too. +1
Reply
#3

Quote:
Originally Posted by Affan
Посмотреть сообщение
Nice job, i'll test it out too. +1
Thanks.
Reply
#4

Looks nicee,good job
Reply
#5

Quote:
Originally Posted by Gen3i
Посмотреть сообщение
Looks nicee,good job
Thanks.
Reply
#6

Nice
Reply
#7

Thanks ..
Reply
#8

Looks nice, but can we get any screenshots?
Reply
#9

Quote:
Originally Posted by [SWE]Alexzz
Посмотреть сообщение
Looks nice, but can we get any screenshots?
This is Same As CBCNR(Crazy Bob Cops And Robbers).
Reply
#10

Quote:
Originally Posted by MadLeet
Посмотреть сообщение
This is Same As CBCNR(Crazy Bob Cops And Robbers).
Well, some people don't play CBCNR. Also you have to put a Screenshot it's nessesary for newbies.!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)