Old 08-02-2008   #1 (permalink)
Banned
 
gameguysz's Avatar
 

Join Date: Jul 2008
Posts: 31
gameguysz is an unknown quantity at this point
Cool Help: Lua Code For Spawing Npc's

Hi there i am creating something (not going to tell what but it is a weapon that shoots a bug bait and i need help trying to make it disappear after it hits the ground then spawn a head crap so someone please help me!

Thank you,
Michael

P.S if you need more info then please ask me.

here is the main code i want fixed.
Code:
   1. function SWEP:PrimaryAttack()
   2.    //Call the throw attack function
   3.    self:throw_attack ("models/weapons/w_bugbait.mdl");
   4.        ENT.Model = "models/props_junk/wood_pallet001a.mdl"
   5.     function ENT:Use(ply)
   6.       if ply and ply:IsPlayer() then
   7.         if ply:KeyDownLast(IN_USE) then return end
   8.       end
   9.       local zombie = ents.Create("npc_zombie")
  10.       zombie:SetPos(self.Entity:GetPos()+ self.Entity:GetUp()*10)
  11.       zombie:Spawn()
  12.       zombie:Activate()
  13.    end
  14.  
  15.   end

i would like it to through bug bait, then when the bait hits the ground it disappears then a head crab pops out.

by the way thanks for your help guys.
gameguysz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 08-03-2008   #2 (permalink)
UWSVN Contributor
 
Hitman271's Avatar
 

Join Date: Feb 2008
Location: Alabama, USA
Posts: 385
Hitman271 is on a distinguished road
Send a message via Yahoo to Hitman271
Default Re: Help: Lua Code For Spawing Npc's

Are you trying to actually use that?! Is is supposed to be used in the moongate or actual lua addons?
__________________
Quote:
Originally Posted by Anticept View Post
It is not some place where you can toss your dick around and expect people to suck it.
Quote:
Originally Posted by Black Phoenix on Fixing the Gpu
When I get laid
READ AND GET SEXAH PRONZ OR DONT AN GET BANNED

IF ALL ELSE FAILS THEN READ THIS BEFORE MAKING A HELP THREAD

Remember to ask me for cpu help if you need it, just pm me with your situation and/or problem code
Hitman271 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-03-2008   #3 (permalink)
Banned
 
gameguysz's Avatar
 

Join Date: Jul 2008
Posts: 31
gameguysz is an unknown quantity at this point
Default Re: Help: Lua Code For Spawing Npc's

actual lua addons <_< lol not any gate did i come to the wrong place? i beleave i did XD
gameguysz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-03-2008   #4 (permalink)
UWSVN Contributor
 
Hitman271's Avatar
 

Join Date: Feb 2008
Location: Alabama, USA
Posts: 385
Hitman271 is on a distinguished road
Send a message via Yahoo to Hitman271
Default Re: Help: Lua Code For Spawing Npc's

Well first you need to split that into the actual ent to be spawned and have the swep spawn it where you're looking at.
__________________
Quote:
Originally Posted by Anticept View Post
It is not some place where you can toss your dick around and expect people to suck it.
Quote:
Originally Posted by Black Phoenix on Fixing the Gpu
When I get laid
READ AND GET SEXAH PRONZ OR DONT AN GET BANNED

IF ALL ELSE FAILS THEN READ THIS BEFORE MAKING A HELP THREAD

Remember to ask me for cpu help if you need it, just pm me with your situation and/or problem code
Hitman271 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-03-2008   #5 (permalink)
<3

 
IEF015's Avatar
 

Join Date: Feb 2008
Location: London, ON (Canada, eh?)
Posts: 765
IEF015 has a spectacular aura aboutIEF015 has a spectacular aura about
Default Re: Help: Lua Code For Spawing Npc's

Yeeeeeeeeeeeah...

I used that as an example, not an actual code...
And yes, I did get that from the MoonGate thread.
__________________
Signature:
WIREMOD WILL NOT WORK ON A PIRATED GMOD!


MY COLOUR IS BLUE.
Post your expressions here: www.wiredexpressions.tk
It's my favourite country song. And I hate it.
IEF015's got his own website :3
IEF015 is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-03-2008   #6 (permalink)
Banned
 
gameguysz's Avatar
 

Join Date: Jul 2008
Posts: 31
gameguysz is an unknown quantity at this point
Default Re: Help: Lua Code For Spawing Npc's

well i have no idea how to do it.. some one give me step by step info please...???
gameguysz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008   #7 (permalink)
Member
 
willthemage's Avatar
 

Join Date: Jun 2008
Location: Cassadaga, New York
Posts: 81
willthemage is an unknown quantity at this point
Default Re: Help: Lua Code For Spawing Npc's

well there is a npc spawner stool_npcspawner_v2 Download!
__________________
92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.
98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.

[url=http://ubanimator.com][img]http://img98.imageshack.us/img98/9400/userbar668015aq1.gif[/img][/url]
willthemage is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -7. The time now is 10:57 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.

Page top