

Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!Curly Brackets: { }
Example
function funcName() //'function' Let's Me Define My Function
{ //Starting My Function
} //Ending It
Semi-Colon: ;
Example
funcName(); //By Putting The Semi-Colon I Am Ending My Line/Statement So My Code Knows To Go To The Next Line
Example 2
for (i = 0; i < 10; i++)//In This Example You Can See Im Using The Semi-Colon To Seperate The Variables
{ }
Brackets: ( )
Example
number = 1;
funcName(number)//Initialising A Function With The Argument being number
//An argument is only to be included if the function supports them if not I would just put brackets with nothing inside
Square Brackets: [ ]
Example
studentAge["Justin"] = 15;
studentAge["Brandon"] = 16;
number = studentAge["Justin"] //Number would know be equal to 15
Quotation Marks Are Used For Declaring A String
[code]
Code:
Quotation Marks: " "
Example
myName = "Justin"//myName is now equal to Justin
String
Boolean
Float
Integer
self.stringVariable = "MyString";
self.integerVariable = 1;
self.floatVariable = 1.23;
self.booleanVariable = true;
#using scripts\shared\callbacks_shared
self freezeControls(true);
freezePlayer(player)
{
player freezeControls(true);
}
freezePlayer(level.players[0]); //Freeze Client 0
freezePlayer(self); //Freeze Player Running The Code
function myLoop()//Defining The Function With The Loop
{
self endon("disconnect");//Ends the thread if player disconnects or dies.
self endon("death");
self.number = 1;
for (;;)
{
self.number++; //Increase the number by 1 constantly
wait 0.05; //stop it from lagging and freezing.
}
}
//Calling It On A New Thread
self thread myLoop(); //This will make a new thread and run myLoop
play_sound_on_shoot()
{
self endon("disconnect")
self endon("death")
self iPrintln("press shoot button to play a sound");
for(;;)
{
self waittill ("weapon_fired");
self playsound("zmb_cherry_explode");
wait 1;
}
}
play_sound_on_shoot()
{
self endon("disconnect")
self endon("death")
self iPrintln("Shoot To Play A Sound!");
for(;;)
{
self waittill ("weapon_fired");
self PlaySound("zmb_cherry_explode");
wait 1;
}
}
//Lets Compare
self.swagjumpmodeon = true;
//To
self.superJump = true;
//Which one do you understand more? The Bottom One? yea though so...
//Same goes with function names and anything else that requires naming
function godmode_toggle()
{
if(self.godmode == false)
{
self EnableInvulnerability();
self iPrintln("Godmode Enabled");
self.godmode = true;
}
else
{
self DisableInvulnerability();
self iPrintln("Godmode Disabled");
self.godmode = false;
}
}
function godmode_toggle()
{
if(!isDefined(self.isGod) || !self.isGod)
self EnableInvulnerability();
else
self DisableInvulnerability();
self.isGod = !self.isGod;
self iPrintLn("Godmode " + self.isGod ? "Enabled" : "Disabled");
}
if(self.menuOpen == true)
{
for(i = 0; i < level.players.size; i++)
{
level.players[i] iPrintln("Menu is open");
}
}
if(self.menuOpen)
{
for(i = 0; i < level.players.size; i++)
level.players[i] iPrintln("Menu is open");
}
self thread test();
function test()
{
self iPrintln("I am NOT a looped function");
}
self thread test();
function test()
{
self iPrintln("I am NOT a looped function");
}
test();
function test()
{
self iPrintln("I am NOT a looped function");
}