SA-MP Forums Archive
[Include] [INC] Basic Clock plus Access 2 (Coal) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [INC] Basic Clock plus Access 2 (Coal) (/showthread.php?tid=132915)

Pages: 1 2


[INC] Basic Clock plus Access 2 (Coal) - iron_war_lord - 10.03.2010

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



Re: [FS] Basic Clock plus - V1ceC1ty - 10.03.2010

The little letters for the days are nice


Re: [FS] Basic Clock plus - ДitisOnHuora - 10.03.2010

Nice idea!


Re: [FS] Basic Clock plus - iron_war_lord - 10.03.2010

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


Re: [FS] Basic Clock plus - Deat_Itself - 10.03.2010

cool thats really nice


Re: [FS] Basic Clock plus v1.5.5 [with Access] - iron_war_lord - 10.03.2010

Updated to ZBCplusAccess


Re: [FS] Basic Clock plus v1.5.5 [with Access] - [MWR]Blood - 10.03.2010

Nice work!


Re: [FS] Basic Clock plus v1.5.5 [with Access] - GunFight - 10.03.2010

nice work


Re: [FS] Basic Clock plus v1.5.5 [with Access] - Fj0rtizFredde - 10.03.2010

Nice


Re: [FS] Basic Clock plus v1.5.5 [with Access] - Headyheadster - 10.03.2010

... yeah, good imagination & i like it


Re: [FS] Basic Clock plus v1.5.5 [with Access] - iron_war_lord - 10.03.2010

Thanks guys


Re: [FS] Basic Clock plus v1.5.6 [with Access] - iron_war_lord - 10.03.2010

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

Now works for ALL gamemodes


Re: [FS] Basic Clock plus v1.5.6 [with Access] - ducati09 - 10.03.2010

Код:
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


Re: [FS] Basic Clock plus v1.5.6 [with Access] - iron_war_lord - 10.03.2010

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


Re: [FS] Basic Clock plus v1.5.6 [with Access] - ducati09 - 10.03.2010

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 ^^


Re: [FS] Basic Clock plus v1.5.6 [with Access] - Scenario - 10.03.2010

I sure hope this works.


Re: [FS] Basic Clock plus v1.5.6 [with Access] - iron_war_lord - 10.03.2010

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...


Re: [FS] Basic Clock plus v1.5.6 [with Access] - ducati09 - 10.03.2010

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.


Re: [FS] Basic Clock plus v1.5.6 [with Access] - iron_war_lord - 10.03.2010

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...


Re: [FS] ZBCplusAccess v1.5 - iron_war_lord - 10.03.2010

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