Ulysses Stuff > Suggestions
Give Weapons on Spawn (Group Specific)
-RJ-:
This is more of a request than a suggestion, but I was wondering if anyone could make
it where a user is automatically given weapons when they spawn. Also if it could be group
specific, so you set a specific group to spawn with certain weapons and so when a person
spawns they'll be given the specified weapons. (I'm no pro but is it possible to make it so
it uses a "give" command when they spawn?)
If anyone can do this for me I'll greatly appreciate it! Thanks :)
JamminR:
http://forums.ulyssesmod.net/index.php/topic,3177.0.html
Though particular question in that FAQ is prevent specific, it leads to many discussions that might allow specific.
-RJ-:
I don't necessarily want it so that it limits their loadout to only a select amount of weapons.
What I'm getting at is when the user that's in a specific group will have the default weapons
and will be given weapons that are specified.
The reason for this is because I'm running a Fretta server and I need it so that a group like
Donator would get some fun sweps but would also have the smg to kill props or if it were
Deathrun I'd need it so that they still get those fun sweps but won't have an smg.
JamminR:
I understand what you're going for, and I still recommend you see the FAQ I suggested.
URS, part of the answer to that question, will allow for specific loadouts for each/every group.
MrPresident:
Here you go!
--- Code: ---function Custom_Loadout( ply )
if ply:IsUserGroup("donator") then --checks to see if the player is a member of the group "donator"
ply:GiveAmmo(30,"buckshot",true) --Gives the player ammo type 'buckshot'
ply:Give("weapon_shotgun") --Gives the player weapon weapon_shotgun
end
end
hook.Add( "PlayerLoadout", "CustomGamemodeLoadoutFunction", Custom_Loadout)
--- End code ---
Place this code into a file called customloadout.lua and put that file in your garrysmod/lua/server folder.
You will need to have an if statement for each separate group you wish to give weapons to in this manner.
Individual ply:Give and ply:GiveAmmo can be on separate lines. Be sure you give the player ammo for the weapons you give them if applicable. You can find a list of all the ammo types and weapons here and here
Navigation
[0] Message Index
[#] Next page
Go to full version