AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   entity spawning (https://forums.alliedmods.net/showthread.php?t=24583)

GHW_Chronic 02-26-2006 16:13

entity spawning
 
Code:
entity_playing[id] = create_entity("info_target") entity_set_string(entity_playing[id],EV_SZ_classname,"ghw_playback_ent") entity_set_string(entity_playing[id],EV_SZ_model,"models/player/terror/terror.mdl") entity_set_vector(entity_playing[id],EV_VEC_origin,origin) entity_set_int(entity_playing[id],EV_INT_solid,SOLID_BBOX) entity_set_int(entity_playing[id],EV_INT_movetype,MOVETYPE_FLY) entity_set_edict(entity_playing[id],EV_ENT_owner,33) entity_set_float(entity_playing[id],EV_FL_framerate,1.0) entity_set_int(entity_playing[id],EV_INT_sequence,0) entity_set_size(entity_playing[id],minsize,maxsize)
Exactly like that, model is precached, origin is defined correctly. The entity will spawn, u will not be able to see it (model not set / appears invisible). You can run into the ent (minsize and maxsize are set exactly same size as a player) but if you look at the entity, my server crasher :x. Nothing in logs.

Des12 02-26-2006 16:20

Do you have the model uploaded to the server?

GHW_Chronic 02-26-2006 16:51

lol. yes i do indeed since the terror model is one of the 4 CS models, my server wouldn't work without it.

More Info:
listen server
win32
AMXX 1.6

anyone?

p3tsin 02-26-2006 16:52

shouldnt u use this to set the model :?
Code:
/* Sets the model of an Entity. */ native entity_set_model(iIndex, const szModel[]);

GHW_Chronic 02-26-2006 16:57

either way will work. I have used my other method several times in other plugins and worked but for some reason this exact part right here hates me. Maybe the model setting method has changed since I made my last plugins... I'll try with entity_set_model

GHW_Chronic 02-26-2006 18:00

Quote:

Originally Posted by p3tsin
entity_set_model

wow... That worked. Thanks a lot. + Karma.

Twilight Suzuka 02-26-2006 19:27

Either way WON'T work; some times the damn thing has to be set how the mod wants it to be set.


All times are GMT -4. The time now is 20:15.

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