Thread: Monster Mod
View Single Post
solano
Member
Join Date: Nov 2009
Old 11-24-2009 , 15:17   Re: Monster Mod
Reply With Quote #26

before float:vec{50.0,50.0,5.0} made it spawn in the middle of the map.now when i use it it doesnt
Code:
entid = create_entity( "monster_zombie" );
    if(entid<1)
    {
        console_print(0,"Error creating monster")
        return PLUGIN_HANDLED
    }
    entity_set_origin(entid,Vec)
    DispatchSpawn( entid );
and why
Code:
get_user_origin(id, origin, 0)
origin[0]=origin[0]+10
set_user_origin(id,origin)
moves me but
Code:
console_print(0,"[BEFORE MOVE]x: %f y: %f z: %f",origin[0],origin[1],origin[2])
produces [BEFORE MOVE]x: 0.000000 y: 0.000000 z:0.000000
and set_pev(entid, pev_origin, origin)
gives this error: "Got a NaN origin on monster_zombie" ?

Last edited by solano; 11-24-2009 at 15:37.
solano is offline