Skip to content

Instantly share code, notes, and snippets.

@oscar-broman
oscar-broman / gist:2358595
Created April 11, 2012 10:47
y_dohooks.inc
/*----------------------------------------------------------------------------*\
==============================
y_hooks - Hook any callback!
==============================
Description:
Automatically hooks any callbacks with a very simple syntax.
Legal:
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
diff --git a/y_dohooks.inc b/y_dohooks.inc
index 0adf841..b39ed71 100644
--- a/y_dohooks.inc
+++ b/y_dohooks.inc
@@ -62,6 +62,7 @@ Changelog:
#include <YSI\internal\y_version>
#include <a_samp>
#include <YSI\y_debug>
+#include <YSI\y_stringhash>
<?php
foreach ($amx as $k => $v) {
if (is_object($v)) {
foreach ($v as $_k => $_v) {
if (is_object($_v))
continue;
else if (is_array($_v))
$_v = "Array(" . count($_v) . ")";
$pad = str_repeat(' ', 16 - strlen($_k));
/*----------------------------------------------------------------------------*\
==========================
y_colours - X11 colours!
==========================
Description:
This holds the colour information that used to be part of the text system
but which is far more useful than just for text. This now supports the full
set of X11 colours, both by name and by definition. You can also define
your own if you so choose (up to 32 - should be enough given that this
includes the X11 colours).