SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 10/03/2010, 08:26 AM   #1
iron_war_lord
Big Clucker
 
iron_war_lord's Avatar
 
Join Date: Oct 2009
Posts: 162
Reputation: 0
Default [INC] Basic Clock plus Access 2 (Coal)

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;
}
__________________


Expect Wirez to be rewritten! For some reason, it's gone out the door somewhere >.>
iron_war_lord is offline   Reply With Quote
Old 10/03/2010, 08:31 AM   #2
V1ceC1ty
Banned
 
Join Date: Oct 2008
Location: West Australia
Posts: 1,896
Reputation: 273
Default Re: [FS] Basic Clock plus

The little letters for the days are nice
V1ceC1ty is offline   Reply With Quote
Old 10/03/2010, 08:50 AM   #3
ÄitisOnHuora
Big Clucker
 
Join Date: Aug 2009
Posts: 176
Reputation: 0
Default Re: [FS] Basic Clock plus

Nice idea!
ÄitisOnHuora is offline   Reply With Quote
Old 10/03/2010, 10:03 AM   #4
iron_war_lord
Big Clucker
 
iron_war_lord's Avatar
 
Join Date: Oct 2009
Posts: 162
Reputation: 0
Default Re: [FS] Basic Clock plus

Thanks!!! I'm gonna use this in my own script lol. I'm working on making an include for it so scripters can access the day and hours to put into their own scripts
__________________


Expect Wirez to be rewritten! For some reason, it's gone out the door somewhere >.>
iron_war_lord is offline   Reply With Quote
Old 10/03/2010, 10:33 AM   #5
Deat_Itself
Gangsta
 
Join Date: May 2009
Location: UAE (Abudhabi,Shahama)
Posts: 595
Reputation: 4
Default Re: [FS] Basic Clock plus

cool thats really nice
Deat_Itself is offline   Reply With Quote
Old 10/03/2010, 12:14 PM   #6
iron_war_lord
Big Clucker
 
iron_war_lord's Avatar
 
Join Date: Oct 2009
Posts: 162
Reputation: 0
Default Re: [FS] Basic Clock plus v1.5.5 [with Access]

Updated to ZBCplusAccess
__________________


Expect Wirez to be rewritten! For some reason, it's gone out the door somewhere >.>
iron_war_lord is offline   Reply With Quote
Old 10/03/2010, 12:31 PM   #7
[MWR]Blood
High-roller
 
Join Date: Apr 2009
Posts: 2,268
Reputation: 105
Default Re: [FS] Basic Clock plus v1.5.5 [with Access]

Nice work!
__________________
[MWR]Blood is offline   Reply With Quote
Old 10/03/2010, 01:07 PM   #8
GunFight
Big Clucker
 
Join Date: Jan 2010
Posts: 84
Reputation: -2
Default Re: [FS] Basic Clock plus v1.5.5 [with Access]

nice work
GunFight is offline   Reply With Quote
Old 10/03/2010, 01:12 PM   #9
Fj0rtizFredde
Gangsta
 
Fj0rtizFredde's Avatar
 
Join Date: Jun 2008
Location: Sweden
Posts: 888
Reputation: 120
Default Re: [FS] Basic Clock plus v1.5.5 [with Access]

Nice
__________________
Latest crap I've made:
[Include]CleverBot - Never Be Alone Again!
Fj0rtizFredde is offline   Reply With Quote
Old 10/03/2010, 01:53 PM   #10
Headyheadster
Big Clucker
 
Join Date: Mar 2009
Posts: 91
Reputation: 0
Default Re: [FS] Basic Clock plus v1.5.5 [with Access]

... yeah, good imagination & i like it
Headyheadster is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS]LuX TDC! (The Digital Clock) (Realistic and advanced clock) LuxurioN™ Filterscripts 50 02/02/2011 02:07 PM
SA:MP access at violation HELP! jpwnsyou Client Support 0 26/02/2010 08:16 PM
[FilterScript] [FS] Basic Clock (UPDATED to v1.3) iron_war_lord Filterscripts 20 19/02/2010 01:35 AM
Database access? Aoi_Rikuto Server Support 3 31/03/2009 10:01 PM


All times are GMT. The time now is 12:00 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.