View Single Post
Author Message
xfusionlockx
AlliedModders Donor
Join Date: Aug 2014
Old 08-22-2017 , 00:08   [ANY?] Button Detector
Reply With Quote #1

Button Detector
Version: 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);
}
Button List


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 Code
Download The Plugin

Attached Files
File Type: zip button-detector_v1.0.0.zip (7.8 KB, 205 views)

Last edited by xfusionlockx; 09-10-2017 at 16:27. Reason: Moved plugin repository to GitHub.
xfusionlockx is offline