Raised This Month: $32 Target: $400
 8% 

Solved [$15 donation]. Please help embed code for kz mod plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SxLc
Junior Member
Join Date: Jul 2021
Old 12-06-2022 , 19:04   [$15 donation]. Please help embed code for kz mod plugin.
Reply With Quote #1

I'm using this kreedz plugin https://github.com/Theggv/Kreedz with this jumpstats plugin https://xtreme-jumps.eu/e107_plugins...pic.php?379695
However, this jumpstats does not reset the jump when teleporting, so the code needs to be embedded in the kzplugin side.
I need to call forward named fwResetBug for every teleport I have
Example of usage:
PHP Code:
new g_hResetBugForward;

public 
plugin_init()
{
...
g_hResetBugForward CreateMultiForward("fwResetBug"ET_IGNOREFP_CELL);
}

public 
gocheck(id)
{
...
new 
iReturn;
ExecuteForward(g_hResetBugForwardiReturnid);
}

public 
plugin_end()
{
...
DestroyForward(g_hResetBugForward);

I am not familiar with amxx and cannot do this embedding.
I would also appreciate it if you could note where you have rewritten the plugin so that it can be updated.
I can donate 15usd via paypal for helping.
Attached Files
File Type: zip kz.zip (173.1 KB, 32 views)

Last edited by SxLc; 12-07-2022 at 06:58.
SxLc is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 12-07-2022 , 05:28   Re: [$15 donation]. Please help embed code for kz mod plugin.
Reply With Quote #2

Hello, i would like to do this for your, for 15$ as you stated, here is what i have did:

in file kz_core.sma there is a function called when player use /tp, /gc. also kz_menu.sma has option to use /tp from menu, but its calling cmd_Gocheck( id ) so this is the most important part of the code, what is exactly changed:

line 104, added:
Code:
new g_hResetBugForward;
line 115, added (this is where kz_core and Kpoluk's jumpstats would "connect"), in plugin_init():
Code:
g_hResetBugForward = CreateMultiForward("fwResetBug", ET_IGNORE, FP_CELL);
line ~517, in 'public cmd_Gocheck(id)' -> in that moment we call reset function by Kpoluk's original code:
Code:
new iReturn;
ExecuteForward(g_hResetBugForward, iReturn, id);
line ~606, just to be sure all is ok, i added protection to: public cmd_Start(id), because it is also a teleport:
Code:
new iReturn;
ExecuteForward(g_hResetBugForward, iReturn, id);
line ~1016, as Kpoluk suggested plugin_end:
Code:
public plugin_end()
{
	DestroyForward(g_hResetBugForward);
}
*ps* Stuck fucntion is also teleport but its calling cmd_Gocheck which means code is already implemented

I did not test but you tell me if something is not right, im willing to fix until its 100% working.
Hopefully you wont scam me LOL...

Also kz_core.sma attached so you dont need to add any code, just test on your server
Attached Files
File Type: sma Get Plugin or Get Source (kz_core.sma - 42 views - 24.7 KB)
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 12-07-2022 at 06:41. Reason: Done
JocAnis is offline
SxLc
Junior Member
Join Date: Jul 2021
Old 12-07-2022 , 06:41   Re: [$15 donation]. Please help embed code for kz mod plugin.
Reply With Quote #3

It works perfectly!
Thank you for your help.
I have sent you 15USD via paypal.
Did you receive it?
SxLc is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 12-07-2022 , 06:43   Re: [$15 donation]. Please help embed code for kz mod plugin.
Reply With Quote #4

Yes i just received. Thank you, i appreciate the honest agreement!
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis 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 22:06.


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