Curly Brackets: { }
Example
funcName()
{ //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
funcName();
Square Brackets: [ ]
Example
studentAge["Justin"] = 15;
studentAge["Brandon"] = 16;
number = studentAge["Justin"] //Number would know be equal to 15
Quotation Marks: " "
Example
myName = "Justin"//myName is now equal to Justin
String
Boolean
Float
Integer
self.stringVariable = "MyString";
self.integerVariable = 1;
self.floatVariable = 1;
self.booleanVariable = true;
[COLOR="#0000FF"]#include maps/mp/gametypes/_file[/COLOR]
[COLOR="#0000FF"]self [/COLOR][COLOR="#FFD700"]maps\mp\_gscfile::funcName()[/COLOR]
self freezeControls(true);
freezePlayer(player)
{
player freezeControls(true);
}
freezePlayer(level.players[0]); //Freeze Client 0
freezePlayer(self); //Freeze Player Running The Code
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
//<Optional Arg>
waittill(event, <return> //Waits Until An Event Happens Before Executing The Code Below It
endon(event) //Ends a thread/function when an event happens
iPrintln(text) //Prints text to killfeed
iPrintlnBold(text) //Prints text to center of screen
You can find the names of more functions by using google
or by exploring the gsc files from the game which can be found here: [URL="https://www.dropbox.com/sh/6uzfd87ctahizd5/AACbDCvUgv5ABW4ueOwzc7O4a?dl=0"]Dumped GSC Files[/URL]
You can also find a large list of functions here: [URL="https://www.zeroy.com/script/"]MW2 Script Reference[/URL]
crateGun()
{
self endon("disconnect")
self endon("death")
self iPrintln("press shoot button to shoot care packages");
for(;
{
self waittill ("weapon_fired");
self thread maps\mp\killstreaks\_supplydrop::dropcrate(self traceBullet(), self traceBullet()[2], "supplydrop_mp", self, self.team, self.killcament, undefined, undefined, undefined);
wait 1;
}
}
crateGun()
{
self endon("disconnect")
self endon("death")
self iPrintln("Care Package Gun!, Shoot To Spawn Care Packages");
for(;
{
self waittill ("weapon_fired");
self thread maps\mp\killstreaks\_supplydrop::dropcrate(self traceBullet(), self traceBullet()[2], "supplydrop_mp", self, self.team, self.killcament, undefined, undefined, undefined);
wait 1;
}
}
[COLOR="#008000"]//Lets Compare[/COLOR]
[COLOR="#0000FF"]self[/COLOR].swagjumpmodeon = [COLOR="#0000FF"]true[/COLOR];
[COLOR="#008000"]//To[/COLOR]
[COLOR="#0000FF"]self[/COLOR].superJump = [COLOR="#0000FF"]true[/COLOR];
[COLOR="#008000"]//Which one do you understand more? The Bottom One? yea though so...
//Same goes with function names and anything else that requires naming[/COLOR]
Copyright © 2024, NextGenUpdate.
All Rights Reserved.