Ulysses

General => Developers Corner => Topic started by: Rad on July 13, 2007, 03:51:22 AM

Title: Weapons at Spawn : Setup/etc
Post by: Rad 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 (http://forums.ulyssesmod.net/index.php/topic,360.msg1689.html#msg1689) 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)
Title: Re: Weapons at Spawn : Setup/etc
Post by: Chironex on July 13, 2007, 04:49:02 AM
Take a look at:

Gamemode.PlayerSpawn (http://www.garrysmod.com/wiki/?title=Gamemode.PlayerSpawn)
and
Player.Give (http://www.garrysmod.com/wiki/?title=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
Title: Re: Weapons at Spawn : Setup/etc
Post by: Rad 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
Title: Re: Weapons at Spawn : Setup/etc
Post by: JamminR 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