Raised This Month: $51 Target: $400
 12% 

Module: Orpheu (v2.6.3)


Post New Thread Reply   
 
Thread Tools Display Modes
bibu
Veteran Member
Join Date: Sep 2010
Old 12-28-2014 , 05:51   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1391

How can I make a function by using only edict_t so I can be sure that this function doesn't fail?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-28-2014 , 05:57   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1392

Don't understand the question. It's anyway unlikely issue is with Orpheu, you do something wrong with the function. Maybe you should start by explaining what are you doing, from where you retrieve an edict etc.
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 12-28-2014 , 07:17   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1393

Something you can test easily yourself. Anyway:

PHP Code:
#include < amxmodx >
#include < orpheu >
#include < orpheu_stocks >

#define EdictToIndex(%1) OrpheuCall( o_IndexOfEdict, %1 )

new OrpheuFunction:O_ClientPutInServerOrpheuFunction:o_IndexOfEdict;

public 
plugin_precache( )
{
    
O_ClientPutInServer OrpheuGetDLLFunction"pfnClientPutInServer""ClientPutInServer" );

    
OrpheuRegisterHook(O_ClientPutInServer"ClientPutInServer"OrpheuHookPost );
    
    
o_IndexOfEdict OrpheuGetFunction"IndexOfEdict" );
}

public 
ClientPutInServeredict_t )
{
    
//new id = EdictToIndex( edict_t );
    
    
log_amx"ClientPutInServer" );

The hook works perfect, but once getting the id, it crashes with that error.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-28-2014 , 09:26   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1394

I see. You know, if you provide edict_s * as type for ClientPutInServer, Orpheu will convert automatically to an index. Tried, and it works fine.

Assuming you want to work with edict, I've also tried using pfnIndexOfEdict (with/out signatures, but no reason to use with).

Code:
#include <amxmodx> #include <orpheu> #include <orpheu_stocks> public plugin_precache() {     OrpheuRegisterHook(OrpheuGetDLLFunction("pfnClientPutInServer", "ClientPutInServer"), "OnClientPutInServer", OrpheuHookPost); } public OnClientPutInServer(pEdict) {     new index = ENTINDEX(pEdict);         server_print( "ClientPutInServer - index: %d, pEdict = %d", index, pEdict); }  ENTINDEX(edict) {     static OrpheuFunction:function;     if (!function)     {         function = OrpheuGetEngineFunction("pfnIndexOfEdict", "IndexOfEdict");     }         return OrpheuCall(function, edict); }

Code:
{     "name"      : "ClientPutInServer",     "library"   : "mod",     "arguments" :     [         {             "type" : "pointer"         }     ] }

Code:
{     "name"      : "IndexOfEdict",     "library"   : "engine",     "arguments" :     [         {             "type" : "pointer"         }     ],     "return":     {         "type" : "int"     } }


Result:

Code:
ClientPutInServer - index: 1, pEdict = 92510652
ClientPutInServer - index: 2, pEdict = 92511456
ClientPutInServer - index: 3, pEdict = 92512260
ClientPutInServer - index: 4, pEdict = 92513064
Your code is ok, the only thing left is you used "edict_s *" in ClientPutInServer ?
__________________

Last edited by Arkshine; 12-28-2014 at 09:27.
Arkshine is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 12-30-2014 , 08:58   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1395

will be a summary thread with all updated signatures?

It may help a lot to create new orpheu plugins, many people don't know how to get offsets...
baneado is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-30-2014 , 10:15   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1396

It's on the TODO list. But it needs to be thought properly as signature are shared among Orpheu/Okapi/Rage/Others. Just listing signature as it is will be a pain to maintain. Maybe some online tool where you can choose your function, and output format (orpheu, rage, etc) and you will get your config file. And ideally such tool would use some database on github for example, so new functions can be added more easily and fastly.
__________________
Arkshine is offline
Old 12-30-2014, 10:20
HamletEagle
This message has been deleted by HamletEagle.
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 12-30-2014 , 14:08   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1397

Will orpheu be included in amxmodx package?
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-30-2014 , 14:45   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1398

Nope. But Okapi has a good chance, it's similar to Orpheu, and I'm already working to update it to add missing things (removing treemap, factorize natives, more lib support, structures support, etc). Module is somehow better coded, more flexible and has more useful natives. I would say it fits better. Module needs some update as Joaquim just thrown a first version like a motherfucker (lol) and after that, Orpheu will be deprecated i guess.
__________________

Last edited by Arkshine; 12-31-2014 at 02:46.
Arkshine is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 12-30-2014 , 22:18   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1399

Quote:
Originally Posted by Arkshine View Post
as Joaquim just thrown a first version like a motherfucker
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 12-31-2014 , 08:48   Re: Module: Orpheu (v2.6.2)
Reply With Quote #1400

Dat motherfucker
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
Reply



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 15:52.


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