Raised This Month: $51 Target: $400
 12% 

Button access with flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tote
Senior Member
Join Date: Jul 2023
Old 02-21-2024 , 07:10   Button access with flag
Reply With Quote #1

Hi, i have an entity named "func_button" on my map. I want it to be only accesible with flag "A" (ADMIN IMMUNITY) can someone help me with it ?
Tote is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 02-21-2024 , 17:33   Re: Button access with flag
Reply With Quote #2

Untested:
Code:
#include <amxmodx> #include <amxmisc> #include <hamsandwich> #define PLUGIN "Admin Imm Button" #define VERSION "1.0" #define AUTHOR "" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     RegisterHam(Ham_Use, "func_button", "FwdDoorUsePre", 0) } public FwdDoorUsePre(iDoor, id) {     //new szDoorName[32]     //pev(iDoor, pev_targetname, szDoorName, 31)     //if(equal(szDoorName, "admin_imm_button"))     //{     if(get_user_flags(id) & ADMIN_IMMUNITY)     {         return HAM_IGNORED     }     //}     return HAM_SUPERCEDE }
Phant is offline
Send a message via ICQ to Phant
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode