C# foundations for modders
Work with typed variables, expressions, and a visible game notification.
A variable has a type and a value
Use string for text, int for whole numbers, and bool for true/false. A declaration such as int health = 100 + 75; stores the result of an expression. Quoted "175" is text, so it cannot be assigned to an int. Names are case-sensitive.
Use the value you created
GTA.UI.Notification.Show(message); reads a string variable and requests a game notification. A semicolon ends the statement. In this method-body lab, declare message with the exact text Hello, Los Santos! and declare health with a value of 175. Then display message.
Read the program’s result
Run executes a small interpreted C# subset and updates the world preview. This is not a full C# compiler, GTA process, or .NET runtime. The variables panel, trace, and diagnostics show what your supported statements actually did.
Explore as a guest. Your current lab resumes in this browser session. Sign in before learning to save course completions to your account.
Sign in to save progress →