Raised This Month: $ Target: $400
 0% 

Ping hook


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RadiaX^
Junior Member
Join Date: May 2005
Old 01-01-2010 , 23:14   Ping hook
Reply With Quote #1

Good day to all of you.

I've been trying for about 6 hours on this one.
I'm currently using Amxmodx v1.5. Its not recommended, I know, but since all my home-made plugins wont work, I prefer using it rather than spending forever on porting it to 1.8.

I'm relatively new to the amx plugin-scene, but this is what I've got so far for changing the ping:
Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
	register_plugin("-", "1", "-")
	register_forward(FM_UpdateClientData, "fw_UpdateClientData")
}

public fw_UpdateClientData(id)
{
	message_begin(8, 17, _, id)
	write_byte(1)
	write_short(100)
	write_byte(0)
	message_end()			
}
I'm guessing its not a very effective code, but I stripped it down as much as I could without removing the effect of the addon. (Its confirmed working on amx v.1.8.)

Everything seem to work in this code except one small thing;
"register_forward", when I remove it, the plugin successfully loads, but of course it doesn't give the desired effect. And if I leave it, it tells me "bad load".

My question is, is there any other way to hook the scoreboard? Or is there another similar function on earlier versions of amxmod?

And oh, I've tried the debug, but it doesn't tell me that anything is wrong.

Thanks alot in advance.
RadiaX^ is offline
Old 01-02-2010, 05:00
RadiaX^
This message has been deleted by RadiaX^.
RadiaX^
Junior Member
Join Date: May 2005
Old 01-02-2010 , 06:53   Re: Ping hook
Reply With Quote #2

If nobody knows how to do this, is there at least anyone who knows if its even possible in AMX v1.5?
RadiaX^ is offline
Reply


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 04:03.


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