From cd5a42d60576e4d978ac3615defa44fe375e0eaa Mon Sep 17 00:00:00 2001 From: STAM Date: Thu, 24 Jul 2014 23:53:18 +0400 Subject: [PATCH] init --- README.md | 8 ++++--- amxmodx/scripting/amxxeasynoclip.sma | 34 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 amxmodx/scripting/amxxeasynoclip.sma diff --git a/README.md b/README.md index 01f5bc5..627a63b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -AMXx-Easy-Noclip -================ - AMXx Easy Noclip +=================== + +При нажатии заветной клавиши админ может летать. + +Требуется на данный момент флаг С. \ No newline at end of file diff --git a/amxmodx/scripting/amxxeasynoclip.sma b/amxmodx/scripting/amxxeasynoclip.sma new file mode 100644 index 0000000..971c455 --- /dev/null +++ b/amxmodx/scripting/amxxeasynoclip.sma @@ -0,0 +1,34 @@ +#include +#include +#include + +#define PLUGIN "Easy NoClip" +#define VERSION "0.3" +#define AUTHOR "EpicMorg" + + +public plugin_init() { + register_plugin(PLUGIN, VERSION, AUTHOR) + register_concmd("+noclip", "ClCmdOnNoClip") + register_concmd("-noclip", "ClCmdOffNoClip") +} + +public ClCmdOnNoClip(id) + { + //if(!(get_user_flags(id) & ADMIN_IMMUNITY)) + if(!(get_user_flags(id) & ADMIN_LEVEL_C)) + return PLUGIN_CONTINUE; + + set_user_noclip(id, 1) + return PLUGIN_HANDLED; + } + +public ClCmdOffNoClip(id) + { + //if(!(get_user_flags(id) & ADMIN_IMMUNITY)) + if(!(get_user_flags(id) & ADMIN_LEVEL_C)) + return PLUGIN_CONTINUE; + + set_user_noclip(id, 0) + return PLUGIN_HANDLED; +} \ No newline at end of file