Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include < amxmodx >
- #include < engine >
- public plugin_init()
- {
- register_plugin( "Entity Test", "v0.1", "+ColdWar" )
- register_clcmd( "say /test", "ClCmd_Test" );
- register_touch( "box", "player", "Fwd_BoxTouch" );
- }
- public Fwd_BoxTouch( box, client )
- {
- // Do Stuff
- remove_entity( box );
- }
- public ClCmd_Test( client )
- {
- new entity = create_entity( "info_target" );
- if( !is_valid_ent( entity ) )
- {
- log_amx( "Failed to create ENTITY." )
- client_print( client, print_chat, "[AMXX] Failed to create Entity ^"info_target^"" );
- return 1;
- }
- new Float: g_flOrigin[ 3 ];
- entity_get_vector( client, EV_VEC_origin, g_flOrigin );
- g_flOrigin[ 0 ] += 20.0;
- entity_set_origin( client, g_flOrigin );
- entity_set_string( entity, EV_SZ_classname, "box" );
- g_flOrigin[ 0 ] -= 20.0;
- entity_set_model( entity, "models/box.mdl" );
- entity_set_size( entity, Float: { -2.-, -2.0, -2.0 }, Float: { 5.0, 5.0, 5.0 } );
- entity_set_int( entity, EV_INT_solid, SOLID_TRIGGER );
- entity_set_int( entity, EV_INT_movetype, MOVETYPE_TOSS );
- entity_set_int( entity, EV_INT_iuser2, 2 );
- entity_set_origin( entity, g_flOrigin );
- entity_set_float( entity, EV_FL_takedamage, DAMAGE_NO );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement