• Script to spawn with certain SWEPs?
    1 replies, posted
Hey, not sure if this has been brought up: I have several swep packs, and every time I die, I get frustrated to have to spawn the weapons i chose again. Is there any way to designate which weapons I would keep/have when I spawn/respawn? thanks for any help. :D
For this snippet, you need to know the classnames of each weapon you want to spawn with. [lua] local Weapons = { "weapon_pistol", "weapon_crowbar", "gmod_tool", "gmod_camera" } local function Spawn( ply ) if( ply:IsAdmin() ) then for _, V in pairs( Weapons ) do ply:Give( V ) end end end hook.Add( "PlayerSpawn", "GimmeWeapons_Player_Spawn", Spawn ) [/lua] That could be expanded so you can change the weapons in the table while you're playing - without editing and reloading the script. PM me if you want this coded.
Sorry, you need to Log In to post a reply to this thread.