I thought that was the problem, it's basically a line of code that is never executed. I tried looking to execute it a few seconds after map load, but couldn't figure it out. Now that I finally got some sleep I'll have another go at it
Alright, I managed to get it to spawn and work. Now I'm having a problem when I try to do multiple NPC's...
Code:
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
new Float:maxs[3] = {16.0, 16.0, 36.0}
new Float:mins[3] = {-16.0, -16.0, -32.0}
new Float:Vec[3] = {-2376.0, 1219.0, -411.0}
new ent = create_entity("ts_model")
entity_set_string(ent, EV_SZ_classname, "fakenpc")
entity_set_model(ent, "models/mecklenburg/chef.mdl")
entity_set_origin(ent, Vec)
entity_set_size(ent,mins,maxs)
entity_set_int(ent,EV_INT_solid, 2)
entity_set_float(ent,EV_FL_animtime,2.0)
entity_set_float(ent,EV_FL_framerate,1.0)
entity_set_int(ent,EV_INT_sequence,1);
entity_set_byte(ent,EV_BYTE_controller1,125);
entity_set_byte(ent,EV_BYTE_controller2,125);
entity_set_byte(ent,EV_BYTE_controller3,125);
entity_set_byte(ent,EV_BYTE_controller4,125);
new ent1 = create_entity("ts_model")
entity_set_string(ent1, EV_SZ_classname, "fakenpc1")
entity_set_model(ent1, "models/mecklenburg/chef.mdl")
Vec[3] = {-70.0, -448.0, -379.0}
entity_set_origin(ent1, Vec)
entity_set_size(ent1,mins,maxs)
entity_set_int(ent1,EV_INT_solid, 2)
entity_set_float(ent, EV_FL_animtime,2.0)
entity_set_float(ent,EV_FL_framerate,1.0)
entity_set_int(ent1,EV_INT_sequence,1)
entity_set_byte(ent,EV_BYTE_controller1,125);
entity_set_byte(ent,EV_BYTE_controller2,125);
entity_set_byte(ent,EV_BYTE_controller3,125);
entity_set_byte(ent,EV_BYTE_controller4,125);
I defined and used it in the first one, but when it comes to the second one, I don't know how to "re-use" Vec and reset it's coordinates.
I don't think I need 500 new Float:Vec's for all my NPC's.. There has to be another way.
I'm trying to catch my mistakes early, so if anyone can help me, it'd be great.