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

Bind buttons on the player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drimacus
Member
Join Date: Jun 2011
Old 02-16-2024 , 16:04   Bind buttons on the player
Reply With Quote #1

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;

Drimacus is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 03-07-2024 , 06:18   Re: Bind buttons on the player
Reply With Quote #2

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.
Skyy is offline
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 08:52.


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