[Include] [INC] Basic Clock plus Access 2 (Coal)
#1

Zinglish's Basic Clock plus Access 2
(ZBCplusAccess2)
| Source: ZBCplusAccess2 |
| |
/ \
/ \
/----------------------Preview----------------------\
Style 0
Style 1
IDEA: ducati09
\-------------------------------------------------/
| |
/ \
/-------------------------About-------------------------\
ZBCplus is an upgraded version of ZBC
It's very basic and clean yet very effective
It features a basic clock and a digital day counter
\------------------------------------------------------/
| |
| |
| |
| |
/ \
/------------------Commands------------------\
ZBCplus is easy to use
SetHour(Hour);
SetDay(Day);
GetHour();
GetDay();
public OnZBCTimeTick()
public OnZBCDayChange()
\--------------------------------------------/
| |
| |
| |
| |
/ \
/------------------Download------------------\


Click my pins for a download mirror

\-------------------/
_________________________________________________

o What is ZBCplusAccess?
ZBCplusAccess is a digital clock and day counter
It can be used to do many things that are linked to the days or even hours of ZBC

Example: Player's can only race on Tuesdays between 6:00 and 17:00


o Installing ZBCplusAccess
- Copy ZBCplusAccess.inc to \Pawno\includes\
- Script additions:
- Top of script
Code:
#include <ZBCplusAccess>
- public OnGameModeInit()
- Style is from 0 - 1 (For now)
- See previews for style references
Code:
InitializeZBC(style);
- Anywhere, just not in any Callbacks
Code:
public OnZBCTimeTick()
{

}

public OnZBCDayChange()
{

}
- Can be put under any callback (Shows the player the clock and day counter)
Code:
LoadZBCText(playerid);
Done with the bare essentials


o ZBCplusAccess callbacks and stocks
SetHour(Hour); // To set the hour
SetDay(Day); // To set the day
GetHour(); // Returns the current hour
GetDay(); // Returns the current day
public OnZBCTimeTick() // Called when the seconds on the clock changes
public OnZBCDayChange() // Called when the day changes


o Using ZBCplusAccess
There is no direct way for using ZBCplusAccess, so here are a few example lines

A checkpoint appears only on Mondays
Code:
public OnZBCDayChange()
{
	if(GetDay() == ZBC_MONDAY)
	{
	  for(new i=0;i<MAX_PLAYERS;i++)
	  {
	  	SetPlayerCheckpoint(i, 0.0, 0.0, 0.0, 5.0);
      }
	}
}
Player can only race between 5:00 and 15:00
Code:
public OnPlayerEnterCheckpoint(playerid)
{
	if(GetHour() > 5 && GetHour() < 15)
	{
	  SendClientMessage(playerid, COLOR_RED, "You may race");
	}
	else
	{
	  SendClientMessage(playerid, COLOR_RED, "Come back between 5:00 and 15:00");
	}
	return 1;
}
Reply


Messages In This Thread
[INC] Basic Clock plus Access 2 (Coal) - by iron_war_lord - 10.03.2010, 08:26
Re: [FS] Basic Clock plus - by V1ceC1ty - 10.03.2010, 08:31
Re: [FS] Basic Clock plus - by ДitisOnHuora - 10.03.2010, 08:50
Re: [FS] Basic Clock plus - by iron_war_lord - 10.03.2010, 10:03
Re: [FS] Basic Clock plus - by Deat_Itself - 10.03.2010, 10:33
Re: [FS] Basic Clock plus v1.5.5 [with Access] - by iron_war_lord - 10.03.2010, 12:14
Re: [FS] Basic Clock plus v1.5.5 [with Access] - by [MWR]Blood - 10.03.2010, 12:31
Re: [FS] Basic Clock plus v1.5.5 [with Access] - by GunFight - 10.03.2010, 13:07
Re: [FS] Basic Clock plus v1.5.5 [with Access] - by Fj0rtizFredde - 10.03.2010, 13:12
Re: [FS] Basic Clock plus v1.5.5 [with Access] - by Headyheadster - 10.03.2010, 13:53
Re: [FS] Basic Clock plus v1.5.5 [with Access] - by iron_war_lord - 10.03.2010, 14:23
Re: [FS] Basic Clock plus v1.5.6 [with Access] - by iron_war_lord - 10.03.2010, 15:37
Re: [FS] Basic Clock plus v1.5.6 [with Access] - by ducati09 - 10.03.2010, 16:12
Re: [FS] Basic Clock plus v1.5.6 [with Access] - by iron_war_lord - 10.03.2010, 16:47
Re: [FS] Basic Clock plus v1.5.6 [with Access] - by ducati09 - 10.03.2010, 16:53
Re: [FS] Basic Clock plus v1.5.6 [with Access] - by Scenario - 10.03.2010, 17:59
Re: [FS] Basic Clock plus v1.5.6 [with Access] - by iron_war_lord - 10.03.2010, 18:46
Re: [FS] Basic Clock plus v1.5.6 [with Access] - by ducati09 - 10.03.2010, 19:17
Re: [FS] Basic Clock plus v1.5.6 [with Access] - by iron_war_lord - 10.03.2010, 19:28
Re: [FS] ZBCplusAccess v1.5 - by iron_war_lord - 10.03.2010, 20:04
Re: [FS] ZBCplusAccess v1.5 - by ducati09 - 10.03.2010, 20:33
Re: [FS] ZBCplusAccess v1.5 - by iron_war_lord - 10.03.2010, 20:50
Re: [FS] ZBCplusAccess v1.5 - by ducati09 - 10.03.2010, 21:05
Re: [FS] ZBCplusAccess v1.5 - by iron_war_lord - 11.03.2010, 06:37
Re: [FS] ZBCplusAccess v1.5 - by Bomber - 11.03.2010, 09:10
Re: [FS] ZBCplusAccess v1.5 - by iron_war_lord - 11.03.2010, 09:13
Re: [FS] ZBCplusAccess v1.5 - by ducati09 - 13.03.2010, 03:25
Re: [FS] ZBCplusAccess v1.5 - by iron_war_lord - 13.03.2010, 05:45
Re: [FS] ZBCplusAccess v1.5 - by ducati09 - 14.03.2010, 00:56
Re: [FS] ZBCplusAccess v1.5 - by Scenario - 14.03.2010, 03:04
Re: [INC] Basic Clock plus Access 2 (Coal) - by iron_war_lord - 16.03.2010, 17:17
Re: [INC] Basic Clock plus Access 2 (Coal) - by ducati09 - 16.03.2010, 17:58
Re: [INC] Basic Clock plus Access 2 (Coal) - by Scenario - 07.06.2010, 18:18
Re: [INC] Basic Clock plus Access 2 (Coal) - by iron_war_lord - 10.06.2010, 18:49
Re: [INC] Basic Clock plus Access 2 (Coal) - by Luka P. - 10.06.2010, 19:23
Re: [INC] Basic Clock plus Access 2 (Coal) - by Scenario - 11.06.2010, 01:48
Re: [INC] Basic Clock plus Access 2 (Coal) - by WardenCS - 11.06.2010, 09:57
Re: [INC] Basic Clock plus Access 2 (Coal) - by Luka P. - 11.06.2010, 10:57
Re: [INC] Basic Clock plus Access 2 (Coal) - by WardenCS - 11.06.2010, 11:23
Re: [INC] Basic Clock plus Access 2 (Coal) - by mattym - 11.06.2010, 12:16

Forum Jump:


Users browsing this thread: 9 Guest(s)