Page 1 of 1

Scripting: spawn a working weapon

Posted: Sat Dec 25, 2004 12:07 pm
by At0miC
Hey, I need some help with spawning a weapon in a stock map that players can use. I tried to start on this script, but i dunno if it is good, and I need to know how to make it so the player can pickup this weapon.


spawn script_object "targetname" "colt45" "origin" "( 3886 3872 -448 )" // have no location yet
$colt45.model = "weapons/colt45.tik"
$colt45 show
$colt45.angles = ( 0 300 0 ) // not known yet
$colt45.scale = 1.0


thnx At0miC

Posted: Sat Dec 25, 2004 12:15 pm
by Grassy
This is all I have used and it works fine.

Code: Select all

local.colt45 = spawn models/weapons/colt45.tik origin ( -6340 -1555 714.20 ) angles ( 0 0 90 )
Dont define it as a script model and it should be fine.

Posted: Sat Dec 25, 2004 12:41 pm
by At0miC
hey thnx man :D

Posted: Sat Dec 25, 2004 1:08 pm
by At0miC
And does someone know how to make it that if a player picked up that model, that he can't still picking up the ammo for it?

Because if u pickup the gun (so you don't see it anymore), you can still press use to get ammo of it on that location.

Posted: Sun Dec 26, 2004 7:05 pm
by Green Beret
try spawning as static model?