Raised This Month: $ Target: $400
 0% 

Problem spawning weapons. (Solved)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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