ULX

Author Topic: New to ULX a few questions  (Read 5102 times)

0 Members and 2 Guests are viewing this topic.

Offline IizStormViper

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
New to ULX a few questions
« on: May 02, 2012, 10:40:13 AM »
Hello so I'm new to ULX and I'm planning to make a gmod server in 1-3 weeks.I was wondering if anyone could help me with 2 things?


One: Admins spawning weapons in.When you have the Model of the gun in the Q menu and then there is a shield sort of thing there, I was wonder how do you make it so admins can spawn that in?

Two: I was just wonder where i can get all ulx commands a list at least.

Three: On my test server i was wondering how i can make it so admins can move and remove other players props and pickup players. Or something like that.

 Can anybody help with these? thank you :)

update*

Four: How do i make admins spawn with stunstick,unarrest baton,arrest baton basically police stuff
Five: How do i make it so only gundealer can spawn in weapons? Cause for some reason Everyone can :/

Code: [Select]
addentities.lua
AddCustomShipment("Beretta", "models/weapons/w_pist_beretta.mdl", "weapon_Beretta", 1500, 5, true, 450, true, {TEAM_GUN})

Shared.lua
TEAM_GUN = AddExtraTeam("Gun Dealer", Color(255, 140, 0, 255), "models/player/monk.mdl", [[A gun dealer is the only person who can sell guns to other
people.
However, make sure you aren't caught selling guns that are illegal to
the public.
/Buyshipment <name> to Buy a  weapon shipment
/Buygunlab to Buy a gunlab that spawns P228 pistols]], {}, "gundealer", 3, 80, 0, false, false)
[/b]


Six: How do i make it so admins don't have to vote to become a job? :3

Thanks again. Sorry about the questions I'm a newbie at ulx :3
« Last Edit: May 02, 2012, 11:08:07 AM by IizStormViper »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: New to ULX a few questions
« Reply #1 on: May 02, 2012, 12:22:12 PM »
Hello so I'm new to ULX and I'm planning to make a gmod server in 1-3 weeks.I was wondering if anyone could help me with 2 things?


One: Admins spawning weapons in.When you have the Model of the gun in the Q menu and then there is a shield sort of thing there, I was wonder how do you make it so admins can spawn that in?


If you're in the admin/superadmin group or in a group that inherits from it, you should be able to spawn it.


Two: I was just wonder where i can get all ulx commands a list at least.


Use "ulx help" in console, or look at the Facepunch ULX thread (we've got a big image with the commands).


Three: On my test server i was wondering how i can make it so admins can move and remove other players props and pickup players. Or something like that.

 Can anybody help with these? thank you :)


Default ULX behavior allows admins to pick up players. If you're looking for prop protection and removal, check out UPS (in release forum).

update*

Four: How do i make admins spawn with stunstick,unarrest baton,arrest baton basically police stuff
Five: How do i make it so only gundealer can spawn in weapons? Cause for some reason Everyone can :/

Code: [Select]
addentities.lua
AddCustomShipment("Beretta", "models/weapons/w_pist_beretta.mdl", "weapon_Beretta", 1500, 5, true, 450, true, {TEAM_GUN})

Shared.lua
TEAM_GUN = AddExtraTeam("Gun Dealer", Color(255, 140, 0, 255), "models/player/monk.mdl", [[A gun dealer is the only person who can sell guns to other
people.
However, make sure you aren't caught selling guns that are illegal to
the public.
/Buyshipment <name> to Buy a  weapon shipment
/Buygunlab to Buy a gunlab that spawns P228 pistols]], {}, "gundealer", 3, 80, 0, false, false)
[/b]


Six: How do i make it so admins don't have to vote to become a job? :3

Thanks again. Sorry about the questions I'm a newbie at ulx :3

These aren't ULX-related, so I can't offer much help here.
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: New to ULX a few questions
« Reply #2 on: May 02, 2012, 01:01:23 PM »
4. Take a look at the playerloadout hook on the gmod wiki. You'll have to write a small script or have someone do it for you to achieve this function. It's really quite easy.. Don't be intimidated by lua. There should be some examples on the wiki as well.

5. For this... I don't think there is a hook. You might be able to write a script that removes unapproved weapons from players who can't spawn them but the easiest way would be to modify the SWEP code itself. You can write in the groups that are allowed to spawn it with some simple if ply.IsGroup("whatever") then code.


Sorry nothing specific.. but this should at least point you in the right direction.