gamesense-lua
  • Overview
  • Using the cheat
    • Using lua scripts
    • Unlisted features
    • Common issues
  • Developers
    • Writing lua scripts
      • Getting started
      • Examples
        • Simple watermark
        • Head Dot ESP
        • Talk shit
        • Auto buy on round start
        • Create Interface
      • Editors
        • VS Code
        • Sublime Text
        • Atom
      • Events
      • Snippets
      • Compiling lua scripts
    • API Documentation
      • bit
      • client
      • config
      • cvar
      • database
      • entity
      • globals
      • json
      • materialsystem
      • panorama
      • plist
      • renderer
      • ui
      • vector
    • Netprops
      • Important
        • CCSGameRulesProxy
        • CCSPlayer
        • CCSPlayerResource
      • Items
        • CAK47
        • CBaseCSGrenade
        • CBaseGrenade
        • CBreachCharge
        • CBumpMine
        • CC4
        • CDEagle
        • CDecoyGrenade
        • CEconEntity
        • CFists
        • CFlashbang
        • CHEGrenade
        • CIncendiaryGrenade
        • CItem_Healthshot
        • CItemCash
        • CItemDogtags
        • CKnife
        • CKnifeGG
        • CMelee
        • CMolotovGrenade
        • CSCAR17
        • CSensorGrenade
        • CSmokeGrenade
        • CSnowball
        • CTablet
        • CWeaponAug
        • CWeaponAWP
        • CWeaponBaseItem
        • CWeaponBizon
        • CWeaponCSBase
        • CWeaponCSBaseGun
        • CWeaponCycler
        • CWeaponElite
        • CWeaponFamas
        • CWeaponFiveSeven
        • CWeaponG3SG1
        • CWeaponGalil
        • CWeaponGalilAR
        • CWeaponGlock
        • CWeaponHKP2000
        • CWeaponM249
        • CWeaponM3
        • CWeaponM4A1
        • CWeaponMAC10
        • CWeaponMag7
        • CWeaponMP5Navy
        • CWeaponMP7
        • CWeaponMP9
        • CWeaponNegev
        • CWeaponNOVA
        • CWeaponP228
        • CWeaponP250
        • CWeaponP90
        • CWeaponSawedoff
        • CWeaponSCAR20
        • CWeaponScout
        • CWeaponSG550
        • CWeaponSG552
        • CWeaponSG556
        • CWeaponShield
        • CWeaponSSG08
        • CWeaponTaser
        • CWeaponTec9
        • CWeaponTMP
        • CWeaponUMP45
        • CWeaponUSP
        • CWeaponXM1014
        • CWeaponZoneRepulsor
        • ParticleSmokeGrenade
      • Projectiles
        • CBaseCSGrenadeProjectile
        • CBreachChargeProjectile
        • CBumpMineProjectile
        • CDecoyProjectile
        • CMolotovProjectile
        • CSensorGrenadeProjectile
        • CSmokeGrenadeProjectile
        • CSnowballProjectile
      • Environment
        • CColorCorrection
        • CColorCorrectionVolume
        • CEnvAmbientLight
        • CEnvDetailController
        • CEnvDOFController
        • CEnvGasCanister
        • CEnvParticleScript
        • CEnvProjectedTexture
        • CEnvQuadraticBeam
        • CEnvScreenEffect
        • CEnvScreenOverlay
        • CEnvTonemapController
        • CEnvWind
        • CSun
        • CSunlightShadowControl
      • Controllers
        • CDangerZoneController
        • CFogController
        • CFootstepControl
        • CMapVetoPickController
        • CMaterialModifyControl
        • CPoseController
        • CPostProcessController
        • CShadowControl
        • CTeam
        • CTeamplayRoundBasedRulesProxy
        • CVoteController
        • CWaterLODControl
      • Temp Entities
        • CTEArmorRicochet
        • CTEBaseBeam
        • CTEBeamEntPoint
        • CTEBeamEnts
        • CTEBeamFollow
        • CTEBeamLaser
        • CTEBeamPoints
        • CTEBeamRing
        • CTEBeamRingPoint
        • CTEBeamSpline
        • CTEBloodSprite
        • CTEBloodStream
        • CTEBreakModel
        • CTEBSPDecal
        • CTEBubbles
        • CTEBubbleTrail
        • CTEClientProjectile
        • CTEDecal
        • CTEDust
        • CTEDynamicLight
        • CTEEffectDispatch
        • CTEEnergySplash
        • CTEExplosion
        • CTEFireBullets
        • CTEFizz
        • CTEFootprintDecal
        • CTEFoundryHelpers
        • CTEGaussExplosion
        • CTEGlowSprite
        • CTEImpact
        • CTEKillPlayerAttachments
        • CTELargeFunnel
        • CTEMetalSparks
        • CTEMuzzleFlash
        • CTEParticleSystem
        • CTEPhysicsProp
        • CTEPlantBomb
        • CTEPlayerAnimEvent
        • CTEPlayerDecal
        • CTEProjectedDecal
        • CTERadioIcon
        • CTEShatterSurface
        • CTEShowLine
        • CTESmoke
        • CTESparks
        • CTESprite
        • CTESpriteSpray
        • CTEWorldDecal
      • Base Entities
        • CBaseAnimating
        • CBaseAnimatingOverlay
        • CBaseAttributableItem
        • CBaseButton
        • CBaseCombatCharacter
        • CBaseCombatWeapon
        • CBaseDoor
        • CBaseEntity
        • CBaseFlex
        • CBaseParticleEntity
        • CBasePlayer
        • CBasePropDoor
        • CBaseTeamObjectiveResource
        • CBaseTempEntity
        • CBaseToggle
        • CBaseTrigger
        • CBaseViewModel
        • CBaseVPhysicsTrigger
        • CBaseWeaponWorldModel
      • Other
        • CAI_BaseNPC
        • CBeam
        • CBeamSpotlight
        • CBoneFollower
        • CBRC4Target
        • CBreakableProp
        • CBreakableSurface
        • CCascadeLight
        • CChicken
        • CCSRagdoll
        • CCSTeam
        • CDangerZone
        • CDrone
        • CDronegun
        • CDynamicLight
        • CDynamicProp
        • CEconWearable
        • CEmbers
        • CEntityDissolve
        • CEntityFlame
        • CEntityFreezing
        • CEntityParticleTrail
        • CFEPlayerDecal
        • CFireCrackerBlast
        • CFireSmoke
        • CFireTrail
        • CFish
        • CFunc_Dust
        • CFunc_LOD
        • CFuncAreaPortalWindow
        • CFuncBrush
        • CFuncConveyor
        • CFuncLadder
        • CFuncMonitor
        • CFuncMoveLinear
        • CFuncOccluder
        • CFuncReflectiveGlass
        • CFuncRotating
        • CFuncSmokeVolume
        • CFuncTrackTrain
        • CGameRulesProxy
        • CGrassBurn
        • CHandleTest
        • CHostage
        • CHostageCarriableProp
        • CInferno
        • CInfoLadderDismount
        • CInfoMapRegion
        • CInfoOverlayAccessor
        • CLightGlow
        • CMovieDisplay
        • CParadropChopper
        • CParticleFire
        • CParticlePerformanceMonitor
        • CParticleSystem
        • CPhysBox
        • CPhysBoxMultiplayer
        • CPhysicsProp
        • CPhysicsPropMultiplayer
        • CPhysMagnet
        • CPhysPropAmmoBox
        • CPhysPropLootCrate
        • CPhysPropRadarJammer
        • CPhysPropWeaponUpgrade
        • CPlantedC4
        • CPlasma
        • CPlayerPing
        • CPlayerResource
        • CPointCamera
        • CPointCommentaryNode
        • CPointWorldText
        • CPrecipitation
        • CPrecipitationBlocker
        • CPredictedViewModel
        • CProp_Hallucination
        • CPropCounter
        • CPropDoorRotating
        • CPropJeep
        • CPropVehicleDriveable
        • CRagdollManager
        • CRagdollProp
        • CRagdollPropAttached
        • CRopeKeyframe
        • CSceneEntity
        • CSlideshowDisplay
        • CSmokeStack
        • CSnowballPile
        • CSpatialEntity
        • CSpotlightEnd
        • CSprite
        • CSpriteOriented
        • CSpriteTrail
        • CStatueProp
        • CSteamJet
        • CSurvivalSpawnChopper
        • CTesla
        • CTest_ProxyToggle_Networkable
        • CTestTraceline
        • CTriggerPlayerMovement
        • CTriggerSoundOperator
        • CVGuiScreen
        • CWaterBullet
        • CWorld
        • CWorldVguiText
        • DustTrail
        • MovieExplosion
        • RocketTrail
        • SmokeTrail
        • SporeExplosion
        • SporeTrail
Powered by GitBook
On this page
  1. Developers

Writing lua scripts

PreviousCommon issuesNextGetting started

Last updated 3 years ago

To get started with lua scripting, you'll need a suitable text editor. We suggest or , but in theory or even the built-in Microsoft Notepad will probably work just fine. After choosing an editor, head over to

If you're unfamiliar with the Lua programming language, is a great guide to get started.

Things to keep in mind:

  • By default, all loaded lua scripts share the same environment. This means that if 2 scripts use a global variable with the same name, they will conflict with each other and cause all kinds of issues. To prevent this, always remember to make your variables, functions, etc local

VS Code
Sublime Text
Notepad++
Lua in 5 minutes