Results 1 to 7 of 7

Thread: Gs2 inputs

  1. #1
    Veteran siclesleon's Avatar
    Join Date
    Feb 2015
    Location
    Holland , Leeuwarden
    Posts
    184

    Post Gs2 inputs

    Alright so im trying the make some scripts but im getting stuck every single time.

    the reason is , I don't know the inputs thats avaible for gs2 scripting.
    I have seen some work of john on the forum like OnCreate() or somthing like that
    en I en meby other would love to have list of the possibilities to write.

  2. #2
    John has all of the important ones listed in his tutorials, there are too many to write. Here are the most common

    if ("")
    else
    return
    player.chat
    player.ap
    player.guild
    player.nick
    array
    this.key

  3. #3
    Big Cheese Captain
    Join Date
    Jun 2013
    Posts
    1,029
    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(codekey) {


    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.nameNULL);

    //#CLIENTSIDE
    function onActionClientSide() {


    Similar to onActionServerSide, this function is used when you want to go from serverside to clientside

    PHP Code:

    echo(str); 
    This prints a text to the RC.

    PHP Code:

    sleep
    (5); 
    This pauses the code for x amount of seconds. It is different from schedueleEvent because schedueleEvent doesn't pause the code.
    iEra Developer / SFX Admin

    Need help? Contact me:
    Email: [email protected]

  4. #4

  5. #5
    Veteran AceFighter's Avatar
    Join Date
    Jan 2014
    Location
    Netherlands - Europe
    Posts
    377
    Quote Originally Posted by Orange Juice View Post
    Here's the Gs2 Command Bible.
    http://gswiki.wikidot.com/gs2-commands
    Helpfull, thanks.

  6. #6
    Soldier CommanderChainz's Avatar
    Join Date
    Jan 2014
    Location
    In my house
    Posts
    56
    When I was young I played roblox and really into RBX.Lua
    I actually was really good at it, but then I quit roblox
    I then started programming in c++, and got really good with that

    I just looked at some of GS2 and noticed (C++) + RBX.Lua = GS2

    Literally, them two combined would be the exact replica of GS2. Just go on google images and look up RBX.Lua (that's where it reflects the most)
    Era Name: Prime
    ------------------------------

  7. #7
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    Quote Originally Posted by CommanderChainz View Post
    When I was young I played roblox and really into RBX.Lua
    I actually was really good at it, but then I quit roblox
    I then started programming in c++, and got really good with that

    I just looked at some of GS2 and noticed (C++) + RBX.Lua = GS2

    Literally, them two combined would be the exact replica of GS2. Just go on google images and look up RBX.Lua (that's where it reflects the most)
    gs2 is the replica of javascript lmao


    I saw. I conquered. I came.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •