GLOBALELITE.PL GLOBALELITE.pl 83 Napisano 22 Sierpnia 2017 Share Napisano 22 Sierpnia 2017 Button DetectorVersion: 1.0.0 | Made by: FusionLock - Fusion Developments Description: Quote: This is a super simple plugin that detects button presses and releases. This is based on a code snippet released by "psychonic" (Thread by psychonic) This plugin has two forwards, OnButtonPressed and OnButtonReleased, you use them like any other forward you would.Examples: Code: public void OnButtonPressed(int iClient, int iButton){ PrintToChat(iClient, "You pressed %i", iButton);} Code: public void OnButtonReleased(int iClient, int iButton){ PrintToChat(iClient, "You released %i", iButton);} Here's a video proving that the plugin works: Button List PHP Code: #define ATTACK 1#define JUMP 2#define DUCK 4#define FORWARD 8#define BACK 16#define USE 32#define CANCEL 64#define LEFT 128#define RIGHT 256#define MOVELEFT 512#define MOVERIGHT 1024#define ATTACK2 2048#define RUN 4096#define RELOAD 8192#define ALT1 16384#define ALT2 32768#define SCORE 65536#define SPEED 131072#define WALK 262144#define ZOOM 524288#define WEAPON1 1048576#define WEPAON2 2097152#define BULLRUSH 4194304#define GRENADE1 8388608#define GRENADE2 16777216#define ATTACK3 33554432 Usage: Quote: To use this in your plugin make sure buttondetector.smx is running and add this include to your plugin and use the forwards like normal. Code: #include <buttondetector> Browse The Source CodeDownload The Plugin Attached Files buttondetector_1.0.0.zip (6.9 KB) Pełny artykuł: https://forums.alliedmods.net/showthread.php?t=300579&goto=newpost Odnośnik do odpowiedzi Udostępnij na innych stronach
Rekomendowane odpowiedzi