From fd9666d06873c03374ebfeb22f737069e08ff10f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 18 Jul 2004 08:19:20 +0000 Subject: [PATCH] Added change_task() Added server_changelevel forward Added is_user_admin() --- plugins/include/amxmisc.inc | 7 ++++++- plugins/include/amxmodx.inc | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/include/amxmisc.inc b/plugins/include/amxmisc.inc index e60caa8a..ddadf44c 100755 --- a/plugins/include/amxmisc.inc +++ b/plugins/include/amxmisc.inc @@ -114,4 +114,9 @@ stock get_user_wonid(index) get_user_authid(index,authid,31) return str_to_num(authid) } -#endif \ No newline at end of file +#endif + +stock is_user_admin(userid) +{ + return (get_user_flags(id) & ADMIN_ADMIN) +} \ No newline at end of file diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index 2fd0f7a6..5775ce8a 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -35,6 +35,9 @@ forward plugin_cfg(); /* Function called before plugin unloading (server deactivation) */ forward plugin_end(); +/* Function called to handle changelevel */ +forward server_changelevel(); + /* Called on log message. */ forward plugin_log(); @@ -430,6 +433,9 @@ native set_task(Float:time,const function[],id = 0,parameter[]="",len = 0,flags[ * was set in another plugin. */ native remove_task(id = 0, outside = 0); +/* Changes the time of a task */ +native change_task(id = 0, Float:newTime=1.0, outside = 0); + /* Returns 1 if task under given id exists. */ native task_exists(id = 0, outside = 0);