Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: Staff Bar Script

  1. #1

    Staff Bar Script

    I've made a cool staff bar that's free to use by any server. Simple, I know, but it was fun making it! Yes, I'm taking script requests. I'm bored.

    Staff Bar: http://www.era-go.com/pastebin/index.php/view/85619803

    9bd32c05181807c25d3e4acc9e81d51b.png

    Update: There seems to be a problem with the arrow keys and the program. Easy fix. I'll work on it tomorrow.

    Update 2: I have fixed the bug. It involved this line:
    PHP Code:
    if (temp.code getTools().size() && temp.code > -1) { 
    Last edited by The Doctor; 07-22-2013 at 05:14 AM. Reason: Update

  2. #2
    You seem to be trying to create a staff bar similar to iEras one
    *Stefan: ​You steal my cookies?

  3. #3
    I can always change it

    A staff bar going up and down would be a cool idea too.

  4. #4
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Don't trigger server using integers of the element index on the array, that's a really bad idea.
    Another thing, maybe make the function clientside? And triggerserver if needed, because most staff tools are clientside.
    Good work though.
    -Johnaudi

  5. #5
    Quote Originally Posted by John View Post
    Don't trigger server using integers of the element index on the array, that's a really bad idea.
    Care to explain why?


    Quote Originally Posted by John View Post
    Another thing, maybe make the function clientside? And triggerserver if needed, because most staff tools are clientside.
    Good work though.
    I figured that out as soon as I put some boots in the bar :P

  6. #6
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by The Doctor View Post

    Care to explain why?

    I figured that out as soon as I put some boots in the bar :P
    Using array elements and their indexes in a certain variable is a bad idea, because, let's say you add something in the beginning of the array, this will completely change the values set for the others.
    For example:
    Let's say you have 1 is exit, 2 is staff stick
    Then you add staff boomerang as 1, what will happen is: 1 is staff boomerang, 2 is exit, 3 is staff stick.
    And once triggering the server, it will trigger 1, this means it will call the first parameter which is exit (unless you rechange all variables on serverside everytime you add something).
    It's a bit messed up, it's just easier to use array elements and not indexes.
    Last edited by John; 07-28-2013 at 03:35 PM.
    -Johnaudi

  7. #7
    Veteran Striker's Avatar
    Join Date
    Jul 2013
    Location
    Britian
    Posts
    283
    Looks really good!
    Striker*
    -Have any question, concerns or problems?
    Message me on forums, click on the link if you need help: http://era-go.com/forum/member.php?410-Striker
    Need help on iEra P.M my nick name is Striker*
    -Need further help? My email is:[email protected]
    ENjOY PLAYING IERA!!!!!
    -Gani Artist

  8. #8
    Quote Originally Posted by The Doctor View Post
    Care to explain why?
    also its easier when editing the script later on if you are sending a "proper string" like the name of the current tool's function you are about to use as anyone will see right away which tool is being used right now. that way they dont need to figure out the numbers etc
    *Stefan: ​You steal my cookies?

  9. #9
    Quote Originally Posted by John View Post
    Using array elements and their indexes in a certain variable is a bad idea, because, let's say you add something in the beginning of the array, this will completely change the values set for the others.
    For example:
    Let's say you have 1 is exit, 2 is staff stick
    Then you add staff boomerang as 1, what will happen is: 1 is staff boomerang, 2 is exit, 3 is staff stick.
    And once triggering the server, it will trigger 1, this means it will call the first parameter which is exit (unless you rechange all variables on serverside everytime you add something).
    It's a bit messed up, it's just easier to use array elements and not indexes.
    Ah, I see what you mean.

    Quote Originally Posted by callimuc View Post
    also its easier when editing the script later on if you are sending a "proper string" like the name of the current tool's function you are about to use as anyone will see right away which tool is being used right now. that way they dont need to figure out the numbers etc
    It already does that

  10. #10
    Quote Originally Posted by The Doctor View Post
    It already does that
    only for the first parameter, the 2nd is still missing it (you only used numbers for that one)
    *Stefan: ​You steal my cookies?

Tags for this Thread

Posting Permissions

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