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
}
__________________