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

[CS:GO] Simple CSGO Ranks


Post New Thread Reply   
 
Thread Tools Display Modes
juss
Senior Member
Join Date: Jan 2016
Old 01-11-2016 , 01:47   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #31

sigh.. root has full access and pass are set .. so the plugin reads data from databases.cfg to access DB .. i made changes in databases.cfg and it looks like this:

"Databases"
{
"driver_default" "mysql"

// When specifying "host", you may use an IP address, a hostname, or a socket file path

"SimpleRanks"
{
"driver" "default"
"host" "127.0.0.1" //i have tried localhost as well
"database" "steam"
"user" "root"
"pass" "and i put my pass here"
}


"default"
{
"driver" "default"
"host" "localhost"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}

"clientprefs"
{
"driver" "sqlite"
"host" "localhost"
"database" "clientprefs-sqlite"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}
}

could it be a problem here that it reads .. not the SimpleRanks config but default one? .. yet should it still say that plugin failed to load ? .. and maybe you can throw some suggestions on what is the proper way to show that my mysql.sock is not in tmp , but in /var/run/mysqld/mysqld.sock

thanks a lot! <3

Last edited by juss; 01-11-2016 at 01:49.
juss is offline
juss
Senior Member
Join Date: Jan 2016
Old 01-11-2016 , 02:04   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #32

///////

ill made it work ... i just used your databases.cfg with changed pass .. looks like you cant name it whatever name you want (SimpleRanks in my examplee) but it works fine with default =)

steel appreciate suggestions on mysql.sock 'cause its kinda feels weird to have it in tmp folder .. google it, but didnt really find a way to make to show it that its not in tmp but in /var/run/mysqld/mysqld.sock as it is <3
THANKS A LOT !

Last edited by juss; 01-11-2016 at 05:21.
juss is offline
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 01-11-2016 , 18:58   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #33

To change the database used in the databases.cfg file you will need to recompile the plugin.

One of the global vars controls the database used:
PHP Code:
new String:databaseName[128] = "default"
By default it is set to default but in your case you will want to compile with:
PHP Code:
new String:databaseName[128] = "SimpleRanks"
Recompilation requires [INC] Multi Colors includes.
__________________

GZS Servers
Puppetmaster is offline
juss
Senior Member
Join Date: Jan 2016
Old 01-12-2016 , 01:45   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #34

Thanks a lot <3

BTW i was wondering , is there a way to make this plugin not work on warmup rounds. i have like 10 Competitive servers and its like ~100 ppl playing , after install this sometimes i see flood message in console "SendNetMsg x.x.x.x:27005: stream[(null)] buffer overflow (maxsize = 4000)!" and it cause server to lag and i only see them on warmup rounds, i try to keep servers as clean as possible so i dont use any other plugins besides standart sourcemod have, stat is kinda cool future to have , on a warmup rounds too many kills happens so it does make server lag .. potentionaly maybe even will crash it .. do you think its possible to add to the script some string so it won't calculate stats on warmup rounds.. and i believe it will go crazy on gun game mod servers =)

Last edited by juss; 01-12-2016 at 06:15.
juss is offline
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 01-12-2016 , 19:31   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #35

Quote:
Originally Posted by juss View Post
Thanks a lot <3

BTW i was wondering , is there a way to make this plugin not work on warmup rounds. i have like 10 Competitive servers and its like ~100 ppl playing , after install this sometimes i see flood message in console "SendNetMsg x.x.x.x:27005: stream[(null)] buffer overflow (maxsize = 4000)!" and it cause server to lag and i only see them on warmup rounds, i try to keep servers as clean as possible so i dont use any other plugins besides standart sourcemod have, stat is kinda cool future to have , on a warmup rounds too many kills happens so it does make server lag .. potentionaly maybe even will crash it .. do you think its possible to add to the script some string so it won't calculate stats on warmup rounds.. and i believe it will go crazy on gun game mod servers =)
This was one of my earlier plugins. It has a fair few limitations since I only designed it to work in retakes and wargames. The main issue I believe you are talking about is the kill buffer. The plugin assumes a maximum of 30 kills per round and only uses that much memory. If it detects that the buffer has reached its capacity during a round it forces it to update the ranks to prevent a crash. This involves it basically pausing the game and uploading the ranks to the MySQL server until the buffer is completely empty. You can probably bypass this by increasing the size of the buffer. This will use more memory. For most people this will not be a problem as it was designed to run on servers of any kind, for instance my test server at the time had less than 512MB of ram. In the future I can probably update large chunks to threaded queries which will resolve the issue entirely. I intend to do it eventually but I just have not found the spare time due to work and rl commitments. ;)
__________________

GZS Servers
Puppetmaster is offline
juss
Senior Member
Join Date: Jan 2016
Old 01-13-2016 , 03:33   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #36

i see

So lags only appears only at the end of warmup round when it start updating/inserting all data to DB as it does at the end of every round.. except at the end of usual round you have no more then 9 kills =) but at the end of warmup round its a tons of kills =) also i was thinking could it be just a flood in game chat .. as it says in chat at the end of round .. what im trying to say is at the and of warmup round its flooding in chat all those kills .. as flood ends and game starts all goes smooth .. if it could be just flood in chat , can you point me what lines to comment in script so it just not gonna output to chat at the end of round.. but only when player types rank in chat

CPrintToChatAll
PrintToServer

thanks <3

Last edited by juss; 01-13-2016 at 15:24.
juss is offline
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 01-13-2016 , 17:50   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #37

Quote:
Originally Posted by juss View Post
i see

So lags only appears only at the end of warmup round when it start updating/inserting all data to DB as it does at the end of every round.. except at the end of usual round you have no more then 9 kills =) but at the end of warmup round its a tons of kills =) also i was thinking could it be just a flood in game chat .. as it says in chat at the end of round .. what im trying to say is at the and of warmup round its flooding in chat all those kills .. as flood ends and game starts all goes smooth .. if it could be just flood in chat , can you point me what lines to comment in script so it just not gonna output to chat at the end of round.. but only when player types rank in chat

CPrintToChatAll
PrintToServer

thanks <3
There is a hook to the player death event. When a player is killed the event is called and the kill information is stored. You could hook to the 'round_freeze_end' and 'round_end' events and not allow kills to be stored by using return if the current game state is between round_end and round_freeze_end. This time would represent the time after a round win/loss and the end of the freeze time. In the case of a map change it would represent the end of the last map and the start of the first round since warm up rounds do not have freeze time.

Alternatively you can use the OnMapStart() to store the current time (The time the map changes) and add a time before which kills are not recorded.

I have not tested these so I dont really know if they will work but they should ;)
__________________

GZS Servers
Puppetmaster is offline
juss
Senior Member
Join Date: Jan 2016
Old 01-14-2016 , 00:42   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #38

also forgot to ask , how could i increasing the size of the buffer? like maybe for 60 kills per round (maybe it'll be enough for a warmup round )

btw i did //comment all CPrintToChatAll lines except one that shows !rank .. and i didnt mess with any of PrintToServer .. too many of them, thought i'd brake something, but with CPrintToChatAll all went smooth, exept server crahed after like 5 minuts =) ... maybe it happened 'cause i load plugin on running server (ppl were playin' and i didnt want to restart it 'cause of them) ..

Thanks! <3

Last edited by juss; 01-14-2016 at 00:45.
juss is offline
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 01-14-2016 , 01:39   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #39

Quote:
Originally Posted by juss View Post
also forgot to ask , how could i increasing the size of the buffer? like maybe for 60 kills per round (maybe it'll be enough for a warmup round )

btw i did //comment all CPrintToChatAll lines except one that shows !rank .. and i didnt mess with any of PrintToServer .. too many of them, thought i'd brake something, but with CPrintToChatAll all went smooth, exept server crahed after like 5 minuts =) ... maybe it happened 'cause i load plugin on running server (ppl were playin' and i didnt want to restart it 'cause of them) ..

Thanks! <3
There are two sets of code involved in this:

Code:
int shooter[32];
int assister[32];
int shot[32];
and

Code:
if(shotPlayers > 31) copyOut();
I dont really think an explanation is really needed ;)
Just make the numbers bigger

In terms of removing CPrintToChatAll lines, you can simply rename them PrintToChatAll and magically they wont take up as much CPU but they will lose their pretty colors so you will need to remove the color tags from the text.
__________________

GZS Servers

Last edited by Puppetmaster; 01-14-2016 at 01:41. Reason: MOAR CODE
Puppetmaster is offline
juss
Senior Member
Join Date: Jan 2016
Old 01-14-2016 , 03:00   Re: [CS:GO] Simple CSGO Ranks
Reply With Quote #40

I'll try that

thanks <3

Last edited by juss; 01-14-2016 at 03:00.
juss 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:52.


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