[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
#2

The little letters for the days are nice
Reply
#3

Nice idea!
Reply
#4

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
Reply
#5

cool thats really nice
Reply
#6

Updated to ZBCplusAccess
Reply
#7

Nice work!
Reply
#8

nice work
Reply
#9

Nice
Reply
#10

... yeah, good imagination & i like it
Reply
#11

Thanks guys
Reply
#12

Sorry guys, Minor Code change, Major Update...

Now works for ALL gamemodes
Reply
#13

Код:
C:\Game 03a\filterscripts\ZBCplus.pwn(29) : fatal error 100: cannot read from file: "ZBCplusAccess"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
I had this same thing with an include file included in LuxAdmin

When I downloaded the individual .inc file it worked for LuxAdmin, but this one I tried to make a new text document renamed it ZBCplusAccess.inc and it still did not work
Reply
#14

If you're running Vista or W7, you need to run Pawno.exe as Administrator.

If you have done that or you are running XP, make sure you have ZBCplusAccess.inc under pawno\includes\

EDIT: reading the last line...Run pawno.exe in the pawno file as admin, that should solve the problem
Reply
#15

I have XP and have copied/cut and pasted/redownloaded the .inc file in pawno/includes/

I had the same error in another post

http://forum.sa-mp.com/index.php?top...4574#msg924574

And I tried the same remedy

Re-downloading the .inc file doesn't work like it did in this post ^^
Reply
#16

I sure hope this works.
Reply
#17

It definitely worked correctly for me.

Windows XP
SA-MP 0.3

If it didn't work correctly, I wouldn't have released it...

Try other things, I have no idea why it doesn't work for you, but like you said, you also had another problem with a different include.

Make sure that your pawno\includes folder is in the same folder as your pawno.cc (Compiler)
Make sure that every folder has it's correct structure >.<

Other than that, try copy all the server things over to your GTA SA again, then try installing the include...
Reply
#18

Can you add a download to your working filterscript .amx file?

It's the only thing I can think of since it won't compile with the include and everything else in the correct locations.
Reply
#19

Well, I'm re-writting this into one include ATM, so as to get rid of the FS and add better features...

When I'm done, you will see the update, then download it and see if it works...
Reply
#20

Ok, MAJOR update, please re-read the very first post...And re-download of course
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)