Author Topic: Help me  (Read 218 times)

0 Members and 1 Guest are viewing this topic.

Offline Santerix

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
    • View Profile
Help me
« on: November 01, 2016, 09:47:41 AM »
I to wanting to make a roleplay of Hogwarts, and was wondering how I leave when the player into the server automatically be set to a specific group of ULX, and I want the player to come in and be setted only once.
I am new in a matter of scripting, so if you can help me, thank you

Offline iViscosity

  • Sr. Member
  • ****
  • Posts: 470
  • Karma: 15
    • View Profile
    • iViscosity Gaming
Re: Help me
« Reply #1 on: November 01, 2016, 10:52:51 AM »
I'm confused as to what you're trying to do... do you mean make it so that when people join they can choose a group that they want to it will put them in a ULX group that corresponds to that group? I.E. a !slytherin command or something like that that puts them in a ulx group called 'slytherin'?
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Forums
Public Discord
Teamspeak

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline Santerix

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
    • View Profile
Re: Help me
« Reply #2 on: November 01, 2016, 12:53:33 PM »
I will try to explain better what I'm trying to do when the player enters the server, it automatically is set in one of the groups that I set up, like not having to open the ULX and do manually

Offline iViscosity

  • Sr. Member
  • ****
  • Posts: 470
  • Karma: 15
    • View Profile
    • iViscosity Gaming
Re: Help me
« Reply #3 on: November 01, 2016, 01:21:20 PM »
Something like this?

Code: Lua
  1. hook.Add( "ULibLocalPlayerReady", "Add To Group", function( ply )
  2.  
  3.    if ply:GetUserGroup() ~= "user" then return end
  4.  
  5.    ply:SetUserGroup( "replace this with user group" )
  6.  
  7. end )
  8.  
Not quite sure if it work as you want it, but something like that?


Hook I referenced
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Forums
Public Discord
Teamspeak

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline Santerix

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
    • View Profile
Re: Help me
« Reply #4 on: November 01, 2016, 01:58:55 PM »
it like this, so I want you to type when the player enters, the player has a 30% chance to enter the SuperAdmin (for example) and a 70% chance to enter the moderator, if this is too complicated, too wanted when player would enter the server, it would be setted as superadmin or admin or moderator, type raffle

Offline iViscosity

  • Sr. Member
  • ****
  • Posts: 470
  • Karma: 15
    • View Profile
    • iViscosity Gaming
Re: Help me
« Reply #5 on: November 01, 2016, 02:00:31 PM »
Ok, so when they join the server, they have an equal chance to be put in one of some predefined usergroups? I'm really having trouble understanding what you're saying :P
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Forums
Public Discord
Teamspeak

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline Santerix

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
    • View Profile
Re: Help me
« Reply #6 on: November 01, 2016, 03:32:58 PM »
haha my bad English and the reason I am Brazilian, what you just said is that I was wanting

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 471
  • Karma: 83
  • I write code
    • View Profile
Re: Help me
« Reply #7 on: November 08, 2016, 01:03:26 PM »
So does this happen for every player when they join, just certain people, when a command is run?
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.