AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved [$15 donation]. Please help embed code for kz mod plugin. (https://forums.alliedmods.net/showthread.php?t=340748)

SxLc 12-06-2022 19:04

[$15 donation]. Please help embed code for kz mod plugin.
 
1 Attachment(s)
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.

JocAnis 12-07-2022 05:28

Re: [$15 donation]. Please help embed code for kz mod plugin.
 
2 Attachment(s)
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

SxLc 12-07-2022 06:41

Re: [$15 donation]. Please help embed code for kz mod plugin.
 
It works perfectly!
Thank you for your help.
I have sent you 15USD via paypal.
Did you receive it?

JocAnis 12-07-2022 06:43

Re: [$15 donation]. Please help embed code for kz mod plugin.
 
Yes i just received. Thank you, i appreciate the honest agreement!


All times are GMT -4. The time now is 15:35.

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