Simply something I made out of lazyness, I got tired of having to type out
lua _PlayerGiveSWEP(1,"rocketlauncher.lua") and lua_openscript emine.lua
It also eliminates the need to figure out whos playerid is whos.
So, I simplified it.
This script makes it so that if you want to give player bob: "
Weapons/Golden-Death/p90.lua", you type in chat:
!gun bob golden-death/p90Or, if you want to give a player bob: "
pushstick.lua" (Not in weapons directory), type
!gun bob pushstickAlternatively, ulx_gun in console.
For opening scripts, if I wanted to open script "
emine.lua" I type
!script emineand it'l open up that script. (Alternatively ulx_sopen in console) Enjoy!
http://ulyssesmod.net/gd/sm.htmlDon't include quotes, .lua, or weapons/ when giving a weapon, it is not neededVersion 2 ChangesYou can now give guns to teams, using !gun TEAM weapon
Teams are:
teamspectator
teamunassigned
teamred
teamblue
teamgreen
teamyellow
An example would be
!gun teamred pushstick
You can now see what options are available by using ulx_list.
This will list all the files in lua/ and lua/weapons.
You can also give it a directory, like so:
ulx_list weapons/BobsSweps
and it will list all the files in there.
You can also add directorys that are protected from listing in the top of the file. The init folder is protected by default.
To see examples, look at my post below!