AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ham_CS_RoundRespawn | From source code (https://forums.alliedmods.net/showthread.php?t=266406)

siriusmd99 07-16-2015 11:48

Ham_CS_RoundRespawn | From source code
 
hello .Can someone write me the source code part from Ham module which has native : Ham_CS_RoundRespawn .
I want to see how it works because it blocks csstats from adding kills and deaths . But i want it blocks only deaths counting for victim , not kills for attacker .

Jhob94 07-16-2015 11:59

Re: Ham_CS_RoundRespawn | From source code
 
How does ham blocks it? Never did to me, probably it's your plugin that is badly done and that is causing a mess.

siriusmd99 07-16-2015 12:40

Re: Ham_CS_RoundRespawn | From source code
 
bb_swap <player> // Switches the player to the opposite team (and respawns them, no death counted.

Yes it does. bb_swap has this native that does swap.

I tried with csx official module and works.

Just show me the part of code of this native.

Nextra 07-16-2015 13:09

Re: Ham_CS_RoundRespawn | From source code
 
AMXModX is an open source project, and you can easily look at the sourcecode yourself (hint: Ham_CS_RoundRespawn has no special code).

siriusmd99 07-16-2015 14:23

Re: Ham_CS_RoundRespawn | From source code
 
Quote:

Originally Posted by Nextra (Post 2320358)
AMXModX is an open source project, and you can easily look at the sourcecode yourself (hint: Ham_CS_RoundRespawn has no special code).

Yes. I know . If there were not a problem i wouldn't create this topic.
But i downloaded ham module and viewed all c++ files using CTRL + F with notepad ++ Ham_CS_RoundRespawn and nothing found.

Edit : Have found only this :
Quote:

/**
* Description: Respawn function for players/bots only! Do not use this on non player/bot entities!
* Forward params: function(this);
* Return type: None.
* Execute params: ExecuteHam(Ham_CS_RoundRespawn, this);
*/
Ham_CS_RoundRespawn,
But i need to see how the function was made .

HamletEagle 07-16-2015 15:42

Re: Ham_CS_RoundRespawn | From source code
 
Ham hooks virtual game functions. I'm writing this crom phone, I can't give a complete explanation. To see it's source code you need to look in CSSDK/to decompile the game dll/so with IDA.

siriusmd99 07-16-2015 15:55

Re: Ham_CS_RoundRespawn | From source code
 
Yes but its HAM prefix . How it can be in gamedll?
I just wanna see how this functions blocks csstats from adding data.

klippy 07-16-2015 16:44

Re: Ham_CS_RoundRespawn | From source code
 
Hamsandwich doesn't define any of those functions (with HAM_ prefix), but instead just calls/hooks virtual functions from game dll.
According to CSSDK by Arkshine, THIS code gets executed when you execute Ham_CS_RoundRespawn. It has nothing to do with csstats.

Nextra 07-16-2015 16:45

Re: Ham_CS_RoundRespawn | From source code
 
The most important part of my answer was the hint: Ham_CS_RoundRespawn has no special code. You won't find it by simply searching for Ham_CS_RoundRespawn. Ham uses a generalized approach to hooking virtual functions (that of function prototypes) and doesn't target any function specifically. It's dynamically done at runtime using hamdata.ini. Understanding Ham to it's full extent is difficult, and you will probably have better luck looking at the source of CSX (and maybe decompilations of the game dll as suggested) and reason about the order of proceedings that may cause your issues. Hooking Ham_CS_RoundRespawn alone should not cause any issues, unless you want to block it. That may prevent another event - one which CSX relies on - from firing.

Jhob94 07-16-2015 17:04

Re: Ham_CS_RoundRespawn | From source code
 
Why are you talking about ham? As i said, it has nothing to do with ham. bb_swap is a command to swap teams, and afaik (didn't saw his version), it doesn't kills people, just force a new spawn. He just needs to give a proper explanation about what he wants and what is happening. You won't find any magic bug at Ham_CS_RoundRespawn.


All times are GMT -4. The time now is 19:00.

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