AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HLstatsX:CE (https://forums.alliedmods.net/forumdisplay.php?f=156)
-   -   Is there any external API for HLstatsX? (https://forums.alliedmods.net/showthread.php?t=313172)

Skipper G44 12-30-2018 12:51

Is there any external API for HLstatsX?
 
I'm looking for a function that will return players rank in stats table.

I want to give players bonuses based on their rank in HLstatsX database.
Bonuses like in any vip plug-in.

Ideally, I'm looking for something like the following interface:
Code:

int GetPlayerRank(int playerID)
Is there any way to do that?

NomisCZ 12-31-2018 13:08

Re: Is there any external API for HLstatsX?
 
Hi,
you can do it in your plugin with SQL query - fetch player rank from HLStatsX database by SteamID.

SQL:
PHP Code:

SELECT playerServerData.skill FROM `hlstats_playeruniqueids` AS player LEFT JOIN `hlstats_players` AS playerServerData ON playerServerData.playerId player.playerId WHERE player.uniqueId "Y:ZZZZZZ" AND player.game "csgo_surf" AND playerServerData.hideranking AND playerServerData.kills >= 1

"Y:ZZZZZZZZZZ" SteamIDbut you need to remove "STEAM_X:" prefix.
"csgo_surf" game (in HLStatsX). 



All times are GMT -4. The time now is 16:49.

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