S&box Wiki

Revision Difference

DoPlayerDevCam#546270

<cat>Code.Player</cat> <title>DoPlayerDevCam</title> # What is a DoPlayerDevCam? DoPlayerDevCam is a method which allows you to block or modify a player's attempts to use a developer camera. ```csharp public override void DoPlayerDevCam( Client player ) { base.DoPlayerDevCam( player ); } ``` If you want to limit access to the developer camera, you can refuse to call `base.DoPlayerDevCam()` In this example, we use a player's Steam64ID (you can find yours [with this site](https://www.steamidfinder.com/)) to grant access to the developer camera. If you want to limit access to the developer camera, you can refuse to call `base.DoPlayerDevCam()` In this example, we use a player's Steam64ID (you can find yours [with this site](https://steamid.xyz/)) to grant access to the developer camera. ```csharp public override void DoPlayerDevCam( Client player ) { if ( player.SteamId != YourSteamIdHereIn64Dec) return; base.DoPlayerDevCam( player ); } ``` How you decide a player may be granted access to the developer camera is up to you. You may wish to set a password, or limit by Steam IDs (seen above). You may also wish to create a new developer camera from scratch!