• Placing weapons on a map without using SDK?
    2 replies, posted
Is it possible to place weapons on maps without using SDK & manually placing weapons? If so, how would this be done? Thanks.
It is perfectly possible. All you need to do is call [url=http://wiki.garrysmod.com/page/Libraries/ents/Create][i]ents.Create[/i][/url] with the weapon's class i.e. [i]weapon_357[/i] and then set the position and angle, and if you want to, the movetype. e.g. [lua]local weapon1 = ents.Create("weapon_smg1") weapon1:SetPos(<map position>) weapon1:SetAngles(<angles>) -- this line isn't needed if you don't want to change the movetype. weapon1:SetMoveType(<movetype enum>) weapon1:Spawn()[/lua] Have a look at entity/weapon classes on the [url=http://wiki.garrysmod.com]wiki[/url] for more options.
Hook that to this: [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexfa7e.html[/url] Make a file called <something>.lua and place it in lua/autorun/server/
Sorry, you need to Log In to post a reply to this thread.