AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Bind buttons on the player (https://forums.alliedmods.net/showthread.php?t=346250)

Drimacus 02-16-2024 16:04

Bind buttons on the player
 
Hello!
I want to use the plugin to bind the button at the player.

Found an example, but it doesn't work.
PHP Code:

public OnPluginStart()
{
   
AddCommandListener(Button_F4"rebuy");
}

public 
Action:Button_F4(clientString:command[], args)
{
   
FakeClientCommand(client"gm");
   return 
Plugin_Continue;



Skyy 03-07-2024 06:18

Re: Bind buttons on the player
 
Valve removed the ability for vscripts and plug-ins to execute client-side command MANY years ago, because it was being used by a lot of people for malicious reasons.

If you want a user to execute a command, they have to opt to do it themselves.
There is no way around this - it is impossible post-patch to execute client-side commands via the server.


All times are GMT -4. The time now is 15:59.

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