Gamemode.PlayerShouldAct
From GMod Wiki
Event Hook | |
Hook Name | PlayerShouldAct |
Syntax | GM:PlayerShouldAct( Player ply, String actname, Number actid ) |
Description | Called when a client "acts" and checks the server wether it can or not. |
Returns | Boolean |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerShouldAct]Gamemode.PlayerShouldAct [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Allows the player to act. |
---|---|
Used on | |
Code | function GM:PlayerShouldAct( ply, actname, actid ) return true end |
Output | The player will be able to perform actions. |
Description | Hook version. |
---|---|
Used on | |
Code | function ShouldAct( ply, actname, actid ) return true end hook.Add( "PlayerShouldAct", "CanAct", ShouldAct ); |
Output | The player will be able to perform actions. |