Author Topic: Weapons at Spawn : Setup/etc  (Read 4606 times)

0 Members and 1 Guest are viewing this topic.

Rad

  • Guest
Weapons at Spawn : Setup/etc
« on: July 13, 2007, 03:51:22 AM »
How do you set up the starting weapons? I searched the forums but starting weapons did not return anything useful

I was able to find this link but I do not know how to set it up. I put that file (ulx_scripts.lua) in the gmod/addons/Ulib/lua/Ulib/modules directory, but the commands dont seem to work.

Plus, its not exactly what I was looking for, I want to change starting weapons not use commands to give players SWEPS

Not sure if this is where it should go, it doesnt really belong in Suggestions, or Bug Report heh... and I would think this would be a FAQ (Unless I just missed something obvious)
« Last Edit: July 13, 2007, 04:16:39 PM by JamminR »

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
Re: Weapons at Spawn : Setup/etc
« Reply #1 on: July 13, 2007, 04:49:02 AM »
Take a look at:

Gamemode.PlayerSpawn
and
Player.Give

Then you can do something like that, very basically:
Code: [Select]
local function GiveCrowbarOnSpawn( ply )
ply:Give( "weapon_crowbar" )
end

hook.Add( "PlayerSpawn", "GiveCrowbarOnSpawnFunc", GiveCrowbarOnSpawn )

I'm also beginner so don't blame me if i'm wrong :P
« Last Edit: July 13, 2007, 04:17:12 PM by JamminR »

Rad

  • Guest
Re: Weapons at Spawn : Setup/etc
« Reply #2 on: July 13, 2007, 05:02:58 AM »
If I do this, where do I put the script? How do I remove the other weapons etc? I have never messed with lua (Other than changing some strings etc), but I have done some minor programming before
« Last Edit: July 13, 2007, 04:17:28 PM by JamminR »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Weapons at Spawn : Setup/etc
« Reply #3 on: July 13, 2007, 04:21:23 PM »
[Note] - Topic moved and renamed due to improper forum location and off-topic to thread posted question
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming