Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Add Friend system

Add Friend system

Scheduled Pinned Locked Moved Help and Support
3 Posts 2 Posters 518 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hayden
    wrote on last edited by
    #1

    Hi I need help. I’m trying to figure out how to add a friend system where you can search for a username and add them etc. any help would be appreciated... :)

    1 Reply Last reply
    0
    • RobinsonXR Offline
      RobinsonXR Offline
      RobinsonX
      wrote on last edited by
      #2

      Wow, this is a difficult task...

      If you are doing actual networking using HTTP requests or socket.io, you are going to need to learn a language called PHP and use a PHP server. I use 000filewebhost by Hostinger to create and manage my PHP server. This way, you can actually become friends with real players and interact with them. (You are probably not doing this, so I won't go into detail.)

      If you are just making a simple project with pre-made or generated usernames, you just need to know how to manipulate arrays to get the desired result you want.

      1 Reply Last reply
      0
      • RobinsonXR Offline
        RobinsonXR Offline
        RobinsonX
        wrote on last edited by
        #3

        All usernames should be inside an array, let's call this array Users.

        When searching for a name, you can loop through the entire array and check for usernames containing what you typed.

        For example, if you typed dog, all usernames containing dog should pop up. dog282, somedog and doggy are examples that follow this condition. Note that hyperPad that have a built-in feature to check if a text contains something, so you will need to make your own.

        So searching for dog should check for usernames in Users for keyword dog.

        All results should be placed in an another array, let's call this Results. This is where all the desired usernames will be after a search.

        After looping through Users, now you can loop through Results to get what you want to show. You can use Get Array Count to show the number of results or make a list appear.

        I know you have a lot of questions on what to do, but I don't know which ones you're going to ask. Feel free to ask me any questions! 😁

        1 Reply Last reply
        1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better šŸ’—

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Search