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

Ham_CS_RoundRespawn | From source code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-16-2015 , 11:48   Ham_CS_RoundRespawn | From source code
Reply With Quote #1

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 .

Last edited by siriusmd99; 07-16-2015 at 11:49.
siriusmd99 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 07-16-2015 , 11:59   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #2

How does ham blocks it? Never did to me, probably it's your plugin that is badly done and that is causing a mess.
__________________
Jhob94 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-16-2015 , 12:40   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #3

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.
siriusmd99 is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 07-16-2015 , 13:09   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #4

AMXModX is an open source project, and you can easily look at the sourcecode yourself (hint: Ham_CS_RoundRespawn has no special code).
__________________
In Flames we trust!
Nextra is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-16-2015 , 14:23   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #5

Quote:
Originally Posted by Nextra View Post
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 .

Last edited by siriusmd99; 07-16-2015 at 14:44.
siriusmd99 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-16-2015 , 15:42   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #6

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.
__________________
HamletEagle is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-16-2015 , 15:55   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #7

Yes but its HAM prefix . How it can be in gamedll?
I just wanna see how this functions blocks csstats from adding data.
siriusmd99 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-16-2015 , 16:44   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #8

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.

Last edited by klippy; 07-16-2015 at 16:45.
klippy is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 07-16-2015 , 16:45   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #9

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.
__________________
In Flames we trust!
Nextra is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 07-16-2015 , 17:04   Re: Ham_CS_RoundRespawn | From source code
Reply With Quote #10

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.
__________________
Jhob94 is offline
Reply



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 05:14.


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