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

[CS:GO] ckSurf (1.18f, 24.11.2015)


Post New Thread Reply   
 
Thread Tools Display Modes
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 03-21-2017 , 22:41   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2501

Quote:
Originally Posted by yash1441 View Post
Zephyrus Store Credits upon finishing the map (bonus and practice included).

Not tested but should work.
Can someone compile this for me with latest SM 1.8? Maybe send me Full plugin in a PM? I can not get it to compile. I would very much appreciate it!

Edit: I used SM 1.8 and its respective compile.exe. With all of the includes required (store, cksurf, etc). kept getting 1 error. cksurf not found or something. Even though it was in the folder.

Last edited by TrappaTroopa; 03-22-2017 at 09:18. Reason: Added more info.
TrappaTroopa is offline
justaFluffypanda
Junior Member
Join Date: Mar 2017
Old 03-22-2017 , 02:44   Re: Trying to set up my first surf server.. Got these errors
Reply With Quote #2502

Quote:
Originally Posted by CdogTV View Post
03/20/2017 - 23:572: [SM] Exception reported: [ckSurf] Unable to connect to database (Configuration "cksurf" not found)
L 03/20/2017 - 23:572: [SM] Blaming: ckSurf.smx
L 03/20/2017 - 23:572: [SM] Call stack trace:
L 03/20/2017 - 23:572: [SM] [0] SetFailState
L 03/20/2017 - 23:572: [SM] [1] Line 158, ckSurf/sql.sp::db_setupDatabase
L 03/20/2017 - 23:572: [SM] [2] Line 1849, D:\ckSurf\csgo\addons\sourcemod\scripting\ckS urf.sp::OnPluginStart
L 03/20/2017 - 23:572: [SM] Unable to load plugin "ckSurf.smx": Error detected in plugin startup (see error logs)
This error means you haven't added the cksurf section to your csgo/addons/sourcemod/configs/databases.cfg file. Have you set up your databases yet?
justaFluffypanda is offline
ASKER_CZ
BANNED
Join Date: Nov 2016
Old 03-22-2017 , 09:37   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2503

BTW some players lose points even when they for example complete map and beat their time . (I didnt add any new map) How is this possible and why is it happening? Thanks. Its important.
ASKER_CZ is offline
CookieB
Member
Join Date: Apr 2016
Location: Germany
Old 03-22-2017 , 14:00   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2504

Quote:
Originally Posted by justaFluffypanda View Post
I've discovered the problem with server displaying the wrong name next to the map record.

In the csgo/addons/sourcemod/scripting/ckSurf/sql.sp file the line

Code:
char sql_selectMapRecord[] = "SELECT MIN(runtimepro), name, steamid FROM ck_playertimes WHERE mapname = '%s' AND runtimepro > -1.0";
is poorly written and returns the wrong value. In fact, in MySQL >= 5.7 this line will cause MySQL to throw an error. I've changed it to this:

Code:
char sql_selectMapRecord[] = "SELECT runtimepro, name, steamid FROM ck_playertimes WHERE mapname = '%s' AND runtimepro = (SELECT MIN(runtimepro) FROM ck_playertimes) AND runtimepro > -1.0";
There are several more poorly written SQL statements in this file, I will report back once I track them all down. Happy coding.

EDIT:
Don't forget to recompile ckSurf and move the new smx file into your csgo/addons/sourcemod/plugins directory after you make changes to sql.sp ;)
I tested your expression in the mysql command line and it returns an empty set for the maps.

-- Your fault seems to be that your second query selects the minimal runtime first and isn't executed upon the first query.

-- Fixing it with minimal change would be:

Code:
SELECT runtimepro, name, steamid FROM ck_playertimes WHERE mapname = '%s' AND runtimepro = (SELECT MIN(runtimepro) FROM ck_playertimes WHERE mapname = '%s' ) AND runtimepro > -1.0;
Though having 2 %s in there means probably usage code needs to be adjusted so not a very good solution.

Code:
mysql  Ver 14.14 Distrib 5.5.54, for debian-linux-gnu (x86_64) using readline 6.3

Last edited by CookieB; 03-22-2017 at 14:17.
CookieB is offline
justaFluffypanda
Junior Member
Join Date: Mar 2017
Old 03-22-2017 , 15:38   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2505

Quote:
Originally Posted by CookieB View Post
I tested your expression in the mysql command line and it returns an empty set for the maps.

-- Your fault seems to be that your second query selects the minimal runtime first and isn't executed upon the first query.

-- Fixing it with minimal change would be:

Code:
SELECT runtimepro, name, steamid FROM ck_playertimes WHERE mapname = '%s' AND runtimepro = (SELECT MIN(runtimepro) FROM ck_playertimes WHERE mapname = '%s' ) AND runtimepro > -1.0;
Though having 2 %s in there means probably usage code needs to be adjusted so not a very good solution.

Code:
mysql  Ver 14.14 Distrib 5.5.54, for debian-linux-gnu (x86_64) using readline 6.3

I should have posted the version of mysql I'm running as my code is working and I did not test it against MySQL 5.5

I'm running MySQL 5.6.16, I'll edit my original post to show this and point the 5.5 users towards your solution

Last edited by justaFluffypanda; 03-22-2017 at 15:41.
justaFluffypanda is offline
CookieB
Member
Join Date: Apr 2016
Location: Germany
Old 03-22-2017 , 16:26   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2506

That's lovely, want to ask about some help for ck surf now though.

I have this problem:

Ranks are not shown fully but seem clipped ( like in what should be EXPERIENCED ), I had a look into the code and on first glance buffers seem big enough. Is it a server setting?

Last edited by CookieB; 03-22-2017 at 16:28.
CookieB is offline
justaFluffypanda
Junior Member
Join Date: Mar 2017
Old 03-22-2017 , 16:38   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2507

Quote:
Originally Posted by CookieB View Post
That's lovely, want to ask about some help for ck surf now though.

I have this problem:

Ranks are not shown fully but seem clipped ( like in what should be EXPERIENCED ), I had a look into the code and on first glance buffers seem big enough. Is it a server setting?
I haven't experienced this issue, to troubleshoot does it cut them off if you disable the Country code being shown on the names?

Should be the ck_country_tag cvar in csgo/cfg/sourcemod/cksurf.cfg, or I believe you can change it via the !ckadmin menu in game.

Code:
 // on/off - Country clan tag
 // -
 // Default: "1"
 // Minimum: "0.000000"
 // Maximum: "1.000000"
 ck_country_tag "0"

Last edited by justaFluffypanda; 03-22-2017 at 16:39.
justaFluffypanda is offline
CookieB
Member
Join Date: Apr 2016
Location: Germany
Old 03-22-2017 , 16:59   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2508

I'd much rather fix it than work around it, I like the country tags.
CookieB is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 03-22-2017 , 17:19   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2509

You're limited by what CS:GO itself has to offer. There is a maximum displayable clan tag length (not sure what it is off hand), but I'm sure you can count the characters.
__________________
sneaK is offline
CookieB
Member
Join Date: Apr 2016
Location: Germany
Old 03-22-2017 , 17:51   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2510

Quote:
Originally Posted by blackhawk74 View Post
You're limited by what CS:GO itself has to offer. There is a maximum displayable clan tag length (not sure what it is off hand), but I'm sure you can count the characters.
If it's that I'll probably go with changing

scripting/ckSurf/timer.sp
Code:
447: Format(tag, 154, "%s | %s", g_szCountryCode[client], g_pr_rankname[client]);
to
447: Format(tag, 154, "%s|%s", g_szCountryCode[client], g_pr_rankname[client]);
CookieB 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 13:56.


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