Raised This Month: $ Target: $400
 0% 

Problem about Arkshine's Orpheu Monster Sample


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MapleRabbit
Junior Member
Join Date: Jan 2010
Old 05-02-2010 , 12:04   Problem about Arkshine's Orpheu Monster Sample
Reply With Quote #1

I've download the Orpheu files and the sample files , put them in the correct floder(like "function"),add orpheu_amxx.dll to module.ini , add plugin in the plugins.ini


In the begining , it didn't work..

I type "spawnContoller"
It's says "unkonwn command"

original script
Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <xs>
#include <orpheu>

enum _:Monster
{
    Grunt,
    Apache,
    Barney,
    BigMomma,
    Bullsquid,
    Controller,
    HAssassin,
    HeadCrab,
    HGrunt,
    Houndeye,
    ISlave,
    Scientist,
    SqueakGrenade,
    Zombie
};

new OrpheuFunction:spawn_monster;
new OrpheuFunction:Smoke3_C;

public plugin_precache()
{
    new OrpheuFunction:HandleAnimEvent = OrpheuGetFunction( "HandleAnimEvent", "CMController" );
    OrpheuRegisterHook( HandleAnimEvent, "OnHandleAnimEvent" );
        
    spawn_monster = OrpheuGetFunction( "spawn_monster" );
    Smoke3_C = OrpheuGetFunction( "Smoke3_C", "CGrenade" );
    
    register_clcmd( "spawnController", "spawnController" );
}

public plugin_init ()
{
    register_plugin( "Orpheu Example", "1.0.0", "Orpheu" );
}

public OnHandleAnimEvent ( const player, const event )
{
    server_print( "Controller %d - Anim Event %d", player, OrpheuGetParamStructMember( 2, "event" ) );
    
    OrpheuSetParamStructMember( 2, "event", 4 );
    
    new Float:origin[ 3 ];
    pev( player, pev_origin, origin );
    
    new grenade = create_entity( "grenade" );
    entity_set_origin( grenade, origin );
    
    OrpheuCallSuper( Smoke3_C, grenade );
}

public spawnController( const player )
{
    new Float:origin[3];
    GetAimOriginDistance( player, origin, 200.0 );
    
    OrpheuCall( spawn_monster, Controller, origin, 0.0, 0 );  
}

GetAimOriginDistance( index, Float:origin[3], Float:dist ) 
{
    new Float:start[ 3 ];
    new Float:view_ofs[ 3 ];
    
    pev( index, pev_origin, start );
    pev( index, pev_view_ofs, view_ofs );
    xs_vec_add( start, view_ofs, start );

    new Float:dest[ 3 ];
    pev(index, pev_v_angle, dest );
    
    engfunc( EngFunc_MakeVectors, dest );
    global_get( glb_v_forward, dest );
    
    xs_vec_mul_scalar( dest, dist, dest );
    xs_vec_add( start, dest, dest );

    engfunc( EngFunc_TraceLine, start, dest, 0, index, 0 );
    get_tr2( 0, TR_vecEndPos, origin );
}  



then I change it to
Code:
 
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <xs>
#define PLUGIN   "New Plugin"
#define AUTHOR   "Unknown"
#define VERSION  "1.0"
#include <orpheu>
enum _:Monster
{
 Grunt,
 Apache,
 Barney,
 BigMomma,
 Bullsquid,
 Controller,
 HAssassin,
 HeadCrab,
 HGrunt,
 Houndeye,
 ISlave,
 Scientist,
 SqueakGrenade,
 Zombie
};
new OrpheuFunction:spawn_monster;
new OrpheuFunction:Smoke3_C;
public plugin_precache()
{
 new OrpheuFunction:HandleAnimEvent = OrpheuGetFunction( "HandleAnimEvent", "CMController" );
 OrpheuRegisterHook( HandleAnimEvent, "OnHandleAnimEvent" );
        
 spawn_monster = OrpheuGetFunction( "spawn_monster" );
 Smoke3_C = OrpheuGetFunction( "Smoke3_C", "CGrenade" );
    

 register_concmd("spawncon","spawnController",ADMIN_KICK,"New Test")
}
public plugin_init ()
{
 register_plugin( "Orpheu Example", "1.0.0", "Orpheu" );
 register_concmd("amx_wzg","spawnController",ADMIN_KICK,"New Test")
}
public OnHandleAnimEvent ( const player, const event )
{
 server_print( "Controller %d - Anim Event %d", player, OrpheuGetParamStructMember( 2, "event" ) );
    
 OrpheuSetParamStructMember( 2, "event", 4 );
    
 new Float:origin[ 3 ];
 pev( player, pev_origin, origin );
    
 new grenade = create_entity( "grenade" );
 entity_set_origin( grenade, origin );
    
 OrpheuCallSuper( Smoke3_C, grenade );
}
public spawnController( const player )
{
 new Float:origin[3];
 GetAimOriginDistance( player, origin, 200.0 );
    
 OrpheuCall( spawn_monster, Controller, origin, 0.0, 0 );  
}
GetAimOriginDistance( index, Float:origin[3], Float:dist ) 
{
 new Float:start[ 3 ];
 new Float:view_ofs[ 3 ];
    
 pev( index, pev_origin, start );
 pev( index, pev_view_ofs, view_ofs );
 xs_vec_add( start, view_ofs, start );
 new Float:dest[ 3 ];
 pev(index, pev_v_angle, dest );
    
 engfunc( EngFunc_MakeVectors, dest );
 global_get( glb_v_forward, dest );
    
 xs_vec_mul_scalar( dest, dist, dest );
 xs_vec_add( start, dest, dest );
 engfunc( EngFunc_TraceLine, start, dest, 0, index, 0 );
 get_tr2( 0, TR_vecEndPos, origin );
}
then I can use the console cmd
I type spawncon

then the error occurs:


L 05/02/2010 - 23:49:22: [ORPHEU] Invalid function [0]
L 05/02/2010 - 23:49:22: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/02/2010 - 23:49:22: [AMXX] Run time error 10: native error (native "OrpheuCall")
L 05/02/2010 - 23:49:22: [AMXX] [0] monsterModExample.sma::spawnController (line 74)
No masters loaded
Using default


Any one can help me ....?

Thank you to my best
Sorryfor my bad English..
MapleRabbit is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:36.


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