Raised This Month: $ Target: $400
 0% 

Problem spawning weapons. (Solved)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-05-2006 , 21:38   Problem spawning weapons. (Solved)
Reply With Quote #1

Hmm.
I'm trying to make a plugin for my father that spawns weapons from a cfg file where he places them.
For some reason, it pulls the correct info such as "weapon_shotgun" for valve mod, with no errors and I guess it makes the entity, but, why doesn't it show in game?

I'm guessing you can't spawn entities like models?

Code:
public ent_spawn(SZ_ent_name[],x,y,z,angle) {     server_print("Name: %s | X: %i | Y: %i | Z: %i | Angle: %i",SZ_ent_name,x,y,z,angle)     new Float:originF[3]     new Float:angles[3] = { 0.0, 0.0, 0.0 }         new ent = create_entity(SZ_ent_name)         //Configure Origin     originF[0] = float(x)     originF[1] = float(y)     originF[2] = float(z)         //Configure Angle     angles[1] = float(angle)         //Set Origin     entity_set_origin(ent,originF)         //Set Angle     entity_set_vector(ent,EV_VEC_angles,angles)         //Set Class Name     entity_set_string(ent,EV_SZ_classname,SZ_ent_name)         g_num_ok++     return PLUGIN_HANDLED }
__________________


Last edited by mysticssjgoku4; 07-05-2006 at 22:16.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Zenith77
Veteran Member
Join Date: Aug 2005
Old 07-05-2006 , 21:39   Re: Problem spawning weapons.
Reply With Quote #2

DispatchSpawn(ent)
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-05-2006 , 22:15   Re: Problem spawning weapons.
Reply With Quote #3

I discourage the use of ripent. Thank you Zenith, you were much help.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Reply


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

Forum Jump


All times are GMT -4. The time now is 08:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode