Raised This Month: $51 Target: $400
 12% 

hack CT/TR num


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 03-25-2019 , 15:34   hack CT/TR num
Reply With Quote #1

Hey guys. Im making KZ Plugin (meaning only CT possible or SPEC)..so my question:

is it possible if you are in SPEC (spectacting someone from CT) to change upper-right corner, independently by real number of players on th server?

https://i.snag.gy/dXsbNg.jpg

I would like to use CT for CP and T for TPs of spectated player

Thanks in advance!
__________________
KZ Public Autocup - PrimeKZ

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

Last edited by JocAnis; 03-25-2019 at 15:35.
JocAnis is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 03-25-2019 , 15:52   Re: hack CT/TR num
Reply With Quote #2

You can change these offsets:
PHP Code:
"m_iNumCTWins"  // short int
{
    
"type"      "short"

    "windows"   "120"
    "linux"     "112"
    "mac"       "112"
}

"m_iNumTerroristWins"  // short int
{
    
"type"      "short"

    "windows"   "122"
    "linux"     "114"
    "mac"       "114"

Or, if you use ReGame: https://dev-cs.ru/amxx/reapi_gamedll...eamscores/view
__________________
My English is A0
E1_531G is offline
thEsp
BANNED
Join Date: Aug 2017
Old 03-25-2019 , 16:17   Re: hack CT/TR num
Reply With Quote #3

//offtopic
Why should TTs always get shafted xD ?
thEsp is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 03-25-2019 , 16:20   Re: hack CT/TR num
Reply With Quote #4

@E1_531G
saw this:https://forums.alliedmods.net/showthread.php?t=181400
but using orhpeu for this simple showing is no no from me, but thanks for suggestion!

another question: is it possible to hook if player is in spec? or must be done prethink->is_user_in_spec ?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-25-2019 , 16:39   Re: hack CT/TR num
Reply With Quote #5

Quote:
Originally Posted by JocAnis View Post
@E1_531G
saw this:https://forums.alliedmods.net/showthread.php?t=181400
but using orhpeu for this simple showing is no no from me, but thanks for suggestion!

another question: is it possible to hook if player is in spec? or must be done prethink->is_user_in_spec ?
>simple showing
>no other way except orpheu

Pick one.
__________________

Last edited by HamletEagle; 03-25-2019 at 16:39.
HamletEagle is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 03-25-2019 , 19:59   Re: hack CT/TR num
Reply With Quote #6

If you are using AMXX 1.9 you have these new natives:
Quote:
get_gamerules_int
set_gamerules_int
So, for the offsets above you don't need Orpheu.
Even "UpdateTeamScores" can be simply done with two messages, as in the game itself:
PHP Code:
void CHalfLifeMultiplay::UpdateTeamScores()
{
    
MESSAGE_BEGIN(MSG_ALLgmsgTeamScore);
        
WRITE_STRING("CT");
        
WRITE_SHORT(m_iNumCTWins);
    
MESSAGE_END();

    
MESSAGE_BEGIN(MSG_ALLgmsgTeamScore);
        
WRITE_STRING("TERRORIST");
        
WRITE_SHORT(m_iNumTerroristWins);
    
MESSAGE_END();

__________________
My English is A0

Last edited by E1_531G; 03-25-2019 at 20:01.
E1_531G 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 21:06.


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