Garry's Mod Wiki

GM:PreventScreenClicks

boolean GM:PreventScreenClicks()

Description

This will prevent IN_ATTACK from sending to server when player tries to shoot from C menu.

Returns

1 boolean
Return true to prevent screen clicks

Example

Prevents usage of the World Clicker feature, where a player can hold C to shoot at their cursor instead of their crosshair.

hook.Add( "PreventScreenClicks", "DisableWorldClicker", function() local pnl = vgui.GetHoveredPanel() if ( pnl:IsWorldClicker() ) then return true end end )

Page Links


Special Pages


Wikis

?

Render Time: 30ms

DB GetPage 3
Generate Html 2
SaveChanges (1) 10
Render Body 0
Render Sidebar 11