Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Thread: Gs2 for the Noobs #5

  1. #11
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    this.whatever = 201;
    this.hi = "pootis";


    I saw. I conquered. I came.


  2. #12
    Quote Originally Posted by Grief Hero View Post
    Would not work as you need a curly bracket after the if statement. You'd also need to declare the variables needed like this.scripting, hard, iMask and rage.quits.
    for what it's worth, the curly bracket isn't a necessity depending on what is being done. it does, however, make things easier to read.

    example:

    PHP Code:
    function onPlayerEnters() { 
      
    this.allowedlist = { "Torankusu""Grief Hero" };
      if (
    player.account in this.allowedlist) continue;
      
      
    //more code can go here...
      //ex, display an image, etc...


  3. #13
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    I never actually knew continue was a command. Would else still work with it though?


    I saw. I conquered. I came.


  4. #14
    Here you go, you are wanting to learn JS anyway, so here's a helpful page on topic of what you are asking:

    http://www.w3schools.com/js/js_break.asp

    I suggest looking into switch statement(s) as well.

  5. #15
    Veteran Wolverine8888's Avatar
    Join Date
    Jun 2013
    Location
    Philippines
    Posts
    315
    Thanks john for the guide, now I understand more about gs2. Haven't tried scripting or practice scripting in a server but learning it just in-case to have knowledge on it.
    Need Help? or Questions?
    Just Ask me and I will give the answer right away
    Want to skype with me? wolverine_graal
    ~Gani Artist

  6. #16
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by Grief Hero View Post
    Would not work as you need a curly bracket after the if statement. You'd also need to declare the variables needed like this.scripting, hard, iMask and rage.quits.
    Actually, if(bool) state; works :O
    -Johnaudi

Posting Permissions

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