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

[CS:GO] Show Competitive Rank on Scoreboard


Post New Thread Reply   
 
Thread Tools Display Modes
4bdul
AlliedModders Donor
Join Date: Dec 2011
Location: United Kingdom
Old 12-28-2014 , 12:54   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #11

Quote:
Originally Posted by Scrumilation View Post
Made a small test plugin from your source code and it seems to be working fine, might try to implement it in timer rankings later https://i.imgur.com/ELMmzu7.png
Can I ask how you got it to show for other players on the scoreboard? I only managed to make it work for only those on your friends list.
__________________
4bdul is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-28-2014 , 20:27   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #12

Code:
public Hook_OnThinkPost(iEnt) {
	static iRankOffset = -1;
	if (iRankOffset == -1) {
		iRankOffset = FindSendPropInfo("CCSPlayerResource", "m_iCompetitiveRanking");
	}
	new iRank[65];
	GetEntDataArray(iEnt, iRankOffset, iRank, MaxClients+1);
	for (new i = 1; i <= MaxClients; i++) {
		if (g_bIsRank[i]) {
			iRank[i] = rank[i];
			SetEntDataArray(iEnt, iRankOffset, iRank, MaxClients+1);
		}
	}
}
change to:
Code:
public Hook_OnThinkPost(iEnt) {
	static iRankOffset = -1;
	if (iRankOffset == -1) {
		iRankOffset = FindSendPropInfo("CCSPlayerResource", "m_iCompetitiveRanking");
	}
	static iRank[MAXPLAYERS+1];
	GetEntDataArray(iEnt, iRankOffset, iRank, MAXPLAYERS+1);
	for (new i = 1; i <= MaxClients; i++) {
		if (g_bIsRank[i]) {
			iRank[i] = rank[i];
		}
	}
	SetEntDataArray(iEnt, iRankOffset, iRank, MAXPLAYERS+1);
}
you could probably change this to use less variables also.

Last edited by Mitchell; 12-28-2014 at 20:27.
Mitchell is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-30-2014 , 11:31   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #13

also: CCSUsrMsg_ServerRankRevealAll is a usermessage, possibly the one used at the end of a match..
Mitchell is offline
Sprilo
Member
Join Date: Aug 2014
Old 12-31-2014 , 09:27   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #14

Can anything be done with the Coin rank?
m_nActiveCoinRank I think it is
Sprilo is offline
Laam4
Member
Join Date: Sep 2014
Old 01-09-2015 , 17:00   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #15

I did some further testing and noticed that players can only see their own fake rank and their friends' fake ranks. Am I doing something wrong? Anyone else noticed this?

Edit:
I found out that "ServerRankRevealAll" usermessage works only on halftime and at the end of map.
PHP Code:
public OnPluginStart()
{
    
HookEvent("announce_phase_end"Event_AnnouncePhaseEnd);
}

public 
Action:Event_AnnouncePhaseEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
Handle:hBuffer StartMessageAll("ServerRankRevealAll");
    if (
hBuffer == INVALID_HANDLE)
    {
        
PrintToServer("ServerRankRevealAll = INVALID_HANDLE");
    }
    else
    {
        
EndMessage();
    }
    return 
Plugin_Continue;


Last edited by Laam4; 01-15-2015 at 03:15. Reason: Update
Laam4 is offline
w1377077
New Member
Join Date: Feb 2014
Old 01-31-2015 , 18:22   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #16

hi, please help me with your plugin !!! set statistics plugin installed and rank shows how to do that all worked?
w1377077 is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 02-19-2015 , 11:54   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #17

Quote:
Originally Posted by Sprilo View Post
Can anything be done with the Coin rank?
m_nActiveCoinRank I think it is
Works but is for the Coin icon in the scoreboard, not the rank


Now I have made a plugin for test differents netprops
The result is here (also I anote it in my test plugin):
PHP Code:
    // uncomment the netprop that you want to test
    
new iRankOffset FindSendPropInfo("CCSPlayerResource""m_nActiveCoinRank"); // Example values: 874 or 1014 or 1030 ...... (is the coin icon in the scoreboard)
    //new iRankOffset = FindSendPropInfo("CCSPlayerResource", "m_iCompetitiveRanking"); // alwways 0
    //new iRankOffset = FindSendPropInfo("CCSPlayerResource", "m_iCompetitiveWins"); // always 0 
Trying to get the real competitive ranking of the players but without luck
Attached Files
File Type: sp Get Plugin or Get Source (rank_get.sp - 1029 views - 1.8 KB)
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 02-19-2015 at 11:55.
Franc1sco is offline
Send a message via MSN to Franc1sco
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 02-22-2015 , 09:32   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #18

Any luck on showing ranks to everyone ?
ImACow is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 02-22-2015 , 11:59   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #19

Quote:
Originally Posted by ImACow View Post
Any luck on showing ranks to everyone ?
Nope

Quote:
Originally Posted by Laam4 View Post
I did some further testing and noticed that players can only see their own fake rank and their friends' fake ranks. Am I doing something wrong? Anyone else noticed this?

Edit:
I found out that "ServerRankRevealAll" usermessage works only on halftime and at the end of map.
PHP Code:
public OnPluginStart()
{
    
HookEvent("announce_phase_end"Event_AnnouncePhaseEnd);
}

public 
Action:Event_AnnouncePhaseEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
Handle:hBuffer StartMessageAll("ServerRankRevealAll");
    if (
hBuffer == INVALID_HANDLE)
    {
        
PrintToServer("ServerRankRevealAll = INVALID_HANDLE");
    }
    else
    {
        
EndMessage();
    }
    return 
Plugin_Continue;

This usermessage dont show ranks so it donīt work. Also the "dummy" field in the ServerRankRevealAll seems to be invalid

Maybe with XRankGet but I am not sure how use it
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 02-22-2015 , 12:13   Re: [CS:GO] Show Competitive Rank on Scoreboard
Reply With Quote #20

Quote:
Originally Posted by Franc1sco View Post
Nope



This usermessage dont show ranks so it donīt work. Also the "dummy" field in the ServerRankRevealAll seems to be invalid

Maybe with XRankGet but I am not sure how use it

Thats an outdated list.
use this one -> https://github.com/Bakkes/demoinfo-c...messages.proto

HTML Code:
message CCSUsrMsg_ServerRankRevealAll {
	optional int32 seconds_till_shutdown = 1;
}
I've seen a server that had ranks and I did not have them as friends.

Last edited by ImACow; 02-22-2015 at 12:15.
ImACow 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 07:49.


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