hi how can i make leaderboards work ?
i m using alpha source + updates 1 2 3 4 5
have the tables in db but is empity o.o
i need set manual or system make it automatic ?
what i make *-*
Printable View
hi how can i make leaderboards work ?
i m using alpha source + updates 1 2 3 4 5
have the tables in db but is empity o.o
i need set manual or system make it automatic ?
what i make *-*
since you are using the community release you should already have the leaderboards working. They should update automatically
yes i m using but leaderboard is empity tables in warz database too
did u kill any zombies or anything
No have 30+ player plaing for day and dont have any players in leaderboard
"No have 30+ player plaing for day and dont have any players in leaderboard" <-- notice day
7 day leaderboard
30 day leaderboard
etc etc
;)
Attachment 129505Attachment 129506Attachment 129507Attachment 129508Attachment 129509
and have players db user data have 40+
in user chars have 316
Those Leaderboards in the database are supposed to be empty. I suspect something you edited broke it.
-- ----------------------------
-- Procedure structure for [WZ_LeaderboardGet]
-- ----------------------------
ALTER PROCEDURE [dbo].[WZ_LeaderboardGet]
@in_Hardcore int,
@in_Type int,
@in_Page int
AS
BEGIN
SET NOCOUNT ON;
-- this call is always success
SELECT 0 AS ResultCode
DECLARE @rowsPerPage FLOAT = 100.0
DECLARE @rowLimit INT = 2000;
DECLARE @startPos INT = (@in_Page - 1) * @rowsPerPage
IF @in_Type = 5 -- Heroes
BEGIN
SELECT TOP (@rowLimit) (@startPos + 1) AS StartPos,
CEILING(COUNT(*) / @rowsPerPage) AS PageCount
FROM UsersChars
WHERE Hardcore = @in_Hardcore AND Reputation >= 0
;WITH LeaderboardData AS
(
SELECT TOP (@rowLimit) Gamertag, Alive, Reputation AS Data,
ROW_NUMBER() OVER
(ORDER BY Reputation DESC) AS Pos
FROM UsersChars
WHERE Hardcore = @in_Hardcore AND Reputation >= 0
)
SELECT Gamertag, Alive, Data
FROM LeaderboardData
WHERE Pos > @startPos AND Pos <= @startPos + @rowsPerPage
END
ELSE IF @in_Type = 6 -- Villains
BEGIN
SELECT TOP (@rowLimit) (@startPos + 1) AS StartPos,
CEILING(COUNT(*) / @rowsPerPage) AS PageCount
FROM UsersChars
WHERE Hardcore = @in_Hardcore AND Reputation < 0
;WITH LeaderboardData AS
(
SELECT TOP (@rowLimit) Gamertag, Alive, Reputation AS Data,
ROW_NUMBER() OVER
(ORDER BY Reputation) AS Pos
FROM UsersChars
WHERE Hardcore = @in_Hardcore AND Reputation < 0
)
SELECT Gamertag, Alive, Data
FROM LeaderboardData
WHERE Pos > @startPos AND Pos <= @startPos + @rowsPerPage
END
ELSE
BEGIN
SELECT TOP (@rowLimit) (@startPos + 1) AS StartPos,
CEILING(COUNT(*) / @rowsPerPage) AS PageCount
FROM UsersChars
WHERE Hardcore = @in_Hardcore
;WITH LeaderboardData AS
(
SELECT TOP (@rowLimit) Gamertag, Alive,
CASE @in_Type
WHEN 0 THEN XP
WHEN 1 THEN TimePlayed
WHEN 2 THEN Stat00 -- KilledZombies
WHEN 3 THEN Stat01 -- KilledSurvivors
WHEN 4 THEN Stat02 -- KilledBandits
WHEN 5 THEN Reputation
WHEN 6 THEN Reputation
ELSE 0
END AS Data,
ROW_NUMBER() OVER
(ORDER BY
CASE WHEN @in_Type = 0 THEN XP END DESC,
CASE WHEN @in_Type = 1 THEN TimePlayed END DESC,
CASE WHEN @in_Type = 2 THEN Stat00 END DESC,
CASE WHEN @in_Type = 3 THEN Stat01 END DESC,
CASE WHEN @in_Type = 4 THEN Stat02 END DESC,
CASE WHEN @in_Type = 5 THEN Reputation END DESC,
CASE WHEN @in_Type = 6 THEN Reputation END) AS Pos
FROM UsersChars
WHERE Hardcore = @in_Hardcore
)
SELECT Gamertag, Alive, Data
FROM LeaderboardData
WHERE Pos > @startPos AND Pos <= @startPos + @rowsPerPage
END
END
Sorry is this a question or answer?
question xD IT IS MY LeaderboardGet FUNCTION *-*
Which broke it -.-