As title. I want my players to spawn with weapon_example and weapon_example2 instead of the crowbar ones etc.
Cheers Facepunch forums!
Call the hook "PlayerSpawn" then Use ply:Give("weapon_example").
[QUOTE=Dafydd;52399925]As title. I want my players to spawn with weapon_example and weapon_example2 instead of the crowbar ones etc.
Cheers Facepunch forums![/QUOTE]
Use the [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/PlayerLoadout]GM:PlayerLoadout[/url] hook (Return true to prevent the default loadout).
What Loadout calls is the the default loadout of the player class, so you can modify the player class if this is a gamemode you're working on.
You can also do this:
[CODE]
hook.Add("PlayerSpawn", "CustomLoadout", function(ply)
ply:StripWeapons()
ply:RemoveAllAmmo()
ply:GiveAmmo( 69, "Pistol", true )
ply:Give( "weapon_example" )
ply:Give( "weapon_example2" )
end)
[/CODE]
Sorry, you need to Log In to post a reply to this thread.