I am making a bouncer in front of the Bar. He is just for looks, but I can't get him facing the right way. He is looking at the wall, and I want him facing away from the wall. I believe this would be changing the Yaw of the model. I am pretty sure this is using Twilight Suzuka's tut, any help would be appriciated, thanks.
Code:
#include <amxmodx>
#include <engine>
new val
public plugin_init()
{
register_plugin( "Bouncer", "1.0", "Atticus" );
}
public plugin_precache()
{
precache_model( "models/player/Korkutzo_Crazy3/korkutzo_crazy3.mdl" )
}
stock create_npc( model[], Float:origin[3], Float:angle = 0.0 )
{
new ent = create_entity("info_target")
entity_set_origin(ent,origin)
entity_set_string(ent,EV_SZ_classname,"ts_model");
entity_set_model(ent,model);
entity_set_int(ent,EV_INT_solid, 2)
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 Float:maxs[3] = {16.0,16.0,30.0}
new Float:mins[3] = {-16.0,-16.0,-30.0}
new Float:angles[3] = { 0.0, 0.0, 0.0 }
angles[1] = angle
entity_set_size(ent,mins,maxs)
entity_set_vector( ent, EV_VEC_angles, angles )
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);
return PLUGIN_HANDLED
}
public client_putinserver( id )
{
if( val ) return PLUGIN_HANDLED
val = 1
new calc = get_maxplayers()
// Model NPC
new Float:npc_origin[3] = { 336.0, 679.0, -411.0 } // teh bounc3r
//
create_npc( "models/player/Korkutzo_Crazy3/korkutzo_crazy3.mdl", npc_origin, 147.0)
return PLUGIN_HANDLED
}
public set_entity_health(door,Float:hp)
{
if(hp == -1.0) {
entity_set_float(door,EV_FL_max_health,2000.0)
entity_set_float(door,EV_FL_health,2000.0)
entity_set_float(door,EV_FL_dmg,0.0)
entity_set_float(door,EV_FL_takedamage,0.0)
return 1
}
entity_set_float(door,EV_FL_max_health,hp)
entity_set_float(door,EV_FL_health,hp)
return 1
}
__________________