AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem about Arkshine's Orpheu Monster Sample (https://forums.alliedmods.net/showthread.php?t=125792)

MapleRabbit 05-02-2010 12:04

Problem about Arkshine's Orpheu Monster Sample
 
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 05-02-2010 12:12

Re: Problem about Arkshine's Orpheu Monster Sample
 
then I change the right version of monstermod then this occurs:

Controller 56 - Anim Event 1
L 05/03/2010 - 00:10:41: [ORPHEU] Invalid function [0]
L 05/03/2010 - 00:10:41: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 00:10:41: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 00:10:41: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)


And they don't attack player at all

joaquimandrade 05-02-2010 12:31

Re: Problem about Arkshine's Orpheu Monster Sample
 
Are you using counter strike?

Edit: ok the problem is that orpheu changed a thing since that was posted.

Go to "\addons\amxmodx\configs\orpheu\functions\CGr enade"

Open "Smoke3_C"

Change the two lines like:

Code:

"mods" : ["cstrike"],
to

Code:

"mod" : "cstrike",

MapleRabbit 05-03-2010 10:54

Re: Problem about Arkshine's Orpheu Monster Sample
 
yes , I'm sure that I'm playing CS

I edited it but it turned out to be

Controller 63 - Anim Event 1
L 05/03/2010 - 22:52:56: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:52:56: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:52:56: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:52:56: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 2
L 05/03/2010 - 22:52:57: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:52:57: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:52:57: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:52:57: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 1
L 05/03/2010 - 22:52:59: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:52:59: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:52:59: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:52:59: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 2
L 05/03/2010 - 22:53:00: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:53:00: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:53:00: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:53:00: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 1
L 05/03/2010 - 22:53:01: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:53:01: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:53:01: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:53:01: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 2
L 05/03/2010 - 22:53:02: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:53:02: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:53:02: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:53:02: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 1
L 05/03/2010 - 22:53:03: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:53:03: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:53:03: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:53:03: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 2
L 05/03/2010 - 22:53:04: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:53:04: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:53:04: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:53:04: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 1
L 05/03/2010 - 22:53:06: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:53:06: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:53:06: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:53:06: [AMXX] [0] monsterModExample.sma::OnHandleAnimEvent (line 66)
Controller 63 - Anim Event 2
L 05/03/2010 - 22:53:07: [ORPHEU] Invalid function [0]
L 05/03/2010 - 22:53:07: [AMXX] Displaying debug trace (plugin "monsterModExample.amxx")
L 05/03/2010 - 22:53:07: [AMXX] Run time error 10: native error (native "OrpheuCallSuper")
L 05/03/2010 - 22:53:07: [AMXX] [0] m


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

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