When I create a entity like this it's fine:
Code:
client_print(id, print_chat, "Created ent")
new ent = create_entity("info_target")
entity_set_string(ent,EV_SZ_classname,"TeleCity")
entity_set_model(ent,"models/player/arctic/arctic.mdl")
entity_set_origin(ent,origin)
entity_set_int(ent, EV_INT_solid, SOLID_BBOX)
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY)
new Float:mina[3]
mina[0]=MINUS_ORIGIN
mina[1]=MINUS_ORIGIN
mina[2]=MINUS_ORIGIN
new Float:maxa[3]
maxa[0]=PLUS_ORIGIN
maxa[1]=PLUS_ORIGIN
maxa[2]=PLUS_ORIGIN
entity_set_size(ent,mina,maxa)
But when I comment out the model setting it crashes:
Code:
client_print(id, print_chat, "Created ent")
new ent = create_entity("info_target")
entity_set_string(ent,EV_SZ_classname,"TeleCity")
//entity_set_model(ent,"models/player/arctic/arctic.mdl")
entity_set_origin(ent,origin)
entity_set_int(ent, EV_INT_solid, SOLID_BBOX)
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY)
new Float:mina[3]
mina[0]=MINUS_ORIGIN
mina[1]=MINUS_ORIGIN
mina[2]=MINUS_ORIGIN
new Float:maxa[3]
maxa[0]=PLUS_ORIGIN
maxa[1]=PLUS_ORIGIN
maxa[2]=PLUS_ORIGIN
entity_set_size(ent,mina,maxa)
Why?
__________________