It's hard to name every function/method GS2 has to offer, but I'll name some. (Note that these won't work logically)
PHP Code:
function onActionServerSide() {
}
//#CLIENTSIDE
triggerserver("gui",this.name,NULL);
Used to trigger the server and go to the serverside. Used for serverside commands that can't be done in the clientside (such as SQL, and logs)
PHP Code:
function onCreated() {
}
This block of code runs when the script is started (by hitting the apply button).
PHP Code:
function onPlayerChats() {
}
Runs when the player chats. You don't need a method/function call for this method to run.
PHP Code:
function onKeyPressed(code, key) {
}
Used when the a player presses the key. Each key has 2 names, the actual key name, and the code. Like the onPlayerChats, this does not require a method call.
PHP Code:
if (temp.variable == "") {
}
Used when you want the computer to make a decision (to put it in simple terms). The if statement can either be true or false. If it is true, then it will run that block of code.
PHP Code:
this.variable = "Hi";
Assigning a value to a variable. this.variable, in this code, now contains the value "Hi" ("Hi" is put in this.variable). This is known as a value type.
PHP Code:
triggerclient("gui", this.name, NULL);
//#CLIENTSIDE
function onActionClientSide() {
}
Similar to onActionServerSide, this function is used when you want to go from serverside to clientside
This prints a text to the RC.
This pauses the code for x amount of seconds. It is different from schedueleEvent because schedueleEvent doesn't pause the code.