AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   lock button from origin (https://forums.alliedmods.net/showthread.php?t=338251)

Mikka 06-21-2022 13:58

lock button from origin
 
Hi, how to lock button?

VV HAM_SUPERCEDE not working

RegisterHam(Ham_Use, "func_button", "ButtonUse", 1);

public ButtonUse(iEnt, id, iActivator) {
return HAM_SUPERCEDE;
}

Shadows Adi 06-21-2022 14:54

Re: lock button from origin
 
Not tested

Code:
// Should be registered as a Pre RegisterHam(Ham_Use, "func_button", "ButtonUse", 0); public ButtonUse(iEnt, id, iActivator, use_type, Float:value) {     SetHamParamInteger(use_type, 0);     return HAM_HANDLED; }

https://github.com/s1lentq/ReGameDLL.../extdef.h#L112

Mikka 06-21-2022 15:18

Re: lock button from origin
 
not working
and how to run function ButtonUse with native or command?

jimaway 06-22-2022 09:53

Re: lock button from origin
 
* Execute params: ExecuteHam(Ham_Use, this, idcaller, idactivator, use_type, Float:value);

Mikka 06-22-2022 12:04

Re: lock button from origin
 
Thanks

Natsheh 06-22-2022 17:33

Re: lock button from origin
 
Quote:

Originally Posted by Mikka (Post 2782076)
Hi, how to lock button?

VV HAM_SUPERCEDE not working

RegisterHam(Ham_Use, "func_button", "ButtonUse", 1);

public ButtonUse(iEnt, id, iActivator) {
return HAM_SUPERCEDE;
}

Didn't you think maybe it wasn't working because you were hooking it as a Post?


All times are GMT -4. The time now is 00:18.

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