Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › DoD Plugins › Trash › Orpheu -> virtualFunctions
7 posts, 3 people · 8,048 views Thread Rating: ★★★★★
closedOrpheu -> virtualFunctions
Started by Dr.G on 02-14-2010, 05:56 PM
Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
02-14-2010, 05:56 PM #1

This is a quick test of the Orpheu module. It looks like its working very well...rnrnIs this better then Hamsandwich? I dont know, but its looks more stabil IMO.rnrnrn

/* Plugin generated by AMXX-Studio */rn////////////////////////////////////////////////////////////////////////////////////////////////////rn#include <amxmodx>rn#include <Orpheu>rn////////////////////////////////////////////////////////////////////////////////////////////////////rn#define PLUGIN "DoD Orpheu testing"rn#define VERSION "1.0 by Dr.G"rn#define AUTHOR "AMXX DoD Team"rn////////////////////////////////////////////////////////////////////////////////////////////////////rn/* NOTE: */rn/* CBasePlayer::PreThink(void) -> Offset WIN32 = 132 */rnrn/* CBasePlayer::Spawn(void) -> Offset WIN32 = 3 */rnrn/* CBasePlayer::Killed(entvars_s *, int) -> Offset WIN32 = 20 */rnrn/* THESE are offsets for Day of Defeat! */rn////////////////////////////////////////////////////////////////////////////////////////////////////rnnew i[33] = 0rnnew time_to_run rnnew counter[33] = 0rnnew is_alive[33] = 0rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic plugin_init() rn{rn	rn	register_plugin(PLUGIN, VERSION, AUTHOR)rn	rn	new OrpheuFunction:iThink = OrpheuGetFunctionFromClass("player", "PreThink", "CBasePlayer" )rn	OrpheuRegisterHook(iThink,"think_Player")rn	rn	new OrpheuFunction:Player_Spawn = OrpheuGetFunctionFromClass("player", "Spawn", "CBasePlayer" )rn	OrpheuRegisterHook(Player_Spawn,"Spawn")rn	rn	new OrpheuFunction:Player_Killed = OrpheuGetFunctionFromClass("player","Killed", "CBasePlayer" )rn	OrpheuRegisterHook(Player_Killed,"player_Killed")rn	rn	time_to_run = register_cvar("time_to_run","30")rn	rn	register_clcmd("say /thinktest","start_Test")rn	rn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic start_Test(id)rn{rn	set_task( get_pcvar_float(time_to_run), "stop_Test", id )rn	counter[id] = 0rn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic stop_Test(id)rn{rn	client_print(id, 3, "*Thinks per Sec: %d", (counter[id]/get_pcvar_num(time_to_run)))rn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic Spawn(player) //looks like its pre..rn{rn	set_task(1.0, "Spawn_Delayed", player)rn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic Spawn_Delayed(id)rn	is_alive[id] = is_user_alive(id)rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic think_Player(player)rn{rn	counter[player]++rn	rn	rn	if(i[player] == 600)rn	{rn		i[player] = 0rn		rn		if(is_alive[player])rn		{rn			client_print(player, 3, "*Thinkin' and alive..")rn			returnrn		}rn		elsern			client_print(player, 3, "*Thinkin' and dead..")rn		rn	}rn	i[player]++rn	rn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic player_Killed(victim, killer, something)rn{rn	is_alive[victim] = 0rn	client_print(victim, 3, "*You died!")rn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rn
rnrnRef.: Orpheu: Using virtual functionsrnrnrn-Cheers!

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
02-14-2010, 07:43 PM #2

this is some interesting stuff youve found here... been browsing thru the threads about it on the amxx forums and it seems like this will open a whole ton of new possibilities

Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
02-14-2010, 07:54 PM #3

It sure will. joaquim andrade unlocked the CS:CZ's build in bots so they would work in CS haha. Its not really user friendly. But will for sure let us do alot of new stuff. I wonder if we somehow can get over the 512 model limit, that would be interessting...

Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
02-14-2010, 10:01 PM #4

BTW. If you wanna hook other stuff like CWEBLEY eg. you gotta add first in the dodaddonsamxmodxconfigsorpheu ypesCBaseEntityaliases just like all the other stuff that allready there. And ofcource you need the signatures for it. nBut you might wanna use CBasePlayerWeapon::vtbl insted, but its possible, and a good way to kill a single weapon, so no one can use it like grenades or what ever...

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
02-15-2010, 12:28 AM #5

i only messed around with it for a few minutes.. and just with the simple string replacing stuff and whatnot

F Fysiks
posted here
Posts: 108
Threads: 3
Joined: Aug 2007
02-15-2010, 12:43 AM #6
Is this better then Hamsandwich? I dont know, but its looks more stabil IMO.rn
rnrnFrom what I gathered from the conversations if you can use Hamsandwich then you should becuase it has less overhead.

Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
02-15-2010, 01:26 PM #7
From what I gathered from the conversations if you can use Hamsandwich then you should becuase it has less overhead.
rnrnYes, just read about it, thanks....

Archive › Old Forum Threads › DoD Plugins › Trash › Orpheu -> virtualFunctions
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC