Raised This Month: $ Target: $400
 0% 

[CS:S] RankMe (Version 2.8.3 - 19 Jul 12)


Post New Thread Reply   
 
Thread Tools Display Modes
Antithasys
Moderator
Join Date: Apr 2008
Old 09-23-2011 , 16:59   Re: [CS:S] RankMe (Version 2.4.5 - 20 Sep 11)
Reply With Quote #411

Quote:
Originally Posted by lokizito View Post
But what issue you found with the version cvar?
This just seems odd to me. Why double set the version number?

PHP Code:
    new Handle:version CreateConVar("rankme_version",PLUGIN_VERSION,"RankMe Version",FCVAR_PLUGIN|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
    
SetConVarString(version,PLUGIN_VERSION,true,true); 
Quote:
Originally Posted by lokizito View Post
And what them problem with they way i handle cvar changes...
You don't just change the cvar that was modified, instead, you reload all of them. This is bad practice in general, and really only passable if you have a small number of cvars, which you do not. You should only modify the variable of the cvar that was changed.

Quote:
Originally Posted by lokizito View Post
...and how should be the chat hooks?
You hook chat to run commands. I am going to have to add this to the rules, but basically, instead of hooking chat to see if they said something, you should turn that into a command and let SourceMod create the chat trigger for you. That way IsChatTrigger() will not fail, as your command would be properly registered. The whole way you do commands and chat triggers is "not clean".

Hope that helps.
__________________
[my plugins]

When you think about asking a question... consider what have you tried?
Antithasys is offline
lokizito
Veteran Member
Join Date: Dec 2010
Location: Brazil
Old 09-23-2011 , 17:50   Re: [CS:S] RankMe (Version 2.4.5 - 20 Sep 11)
Reply With Quote #412

Quote:
Originally Posted by Antithasys View Post
This just seems odd to me. Why double set the version number?

PHP Code:
    new Handle:version CreateConVar("rankme_version",PLUGIN_VERSION,"RankMe Version",FCVAR_PLUGIN|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
    
SetConVarString(version,PLUGIN_VERSION,true,true); 
I may be wrong but i did that to make sure the version cvar would be changed if updated the plugin, or the flags will make that?

Quote:
Originally Posted by Antithasys View Post
You don't just change the cvar that was modified, instead, you reload all of them. This is bad practice in general, and really only passable if you have a small number of cvars, which you do not. You should only modify the variable of the cvar that was changed.
Yeah, going to chang it.

Quote:
Originally Posted by Antithasys View Post
You hook chat to run commands. I am going to have to add this to the rules, but basically, instead of hooking chat to see if they said something, you should turn that into a command and let SourceMod create the chat trigger for you. That way IsChatTrigger() will not fail, as your command would be properly registered. The whole way you do commands and chat triggers is "not clean".
The problem is that i am already creating the command. What i want is that, besides the command's triggers (! and /) to make possible use it without any trigger. (e.g: rank, top, top10)
How should that be done? Searched for ChatTrigger in the Documentation and only found the IsChatTrigger() .

Quote:
Originally Posted by Antithasys View Post
Hope that helps.
Helps a lot.
__________________
[CS:S] RankMe - Why pay for a rank plugin if you can have one for free?
[CS:S] RankMe Connect Announcer - Announce when a player connect
Translation Project - Let's make the plugins to be international
lokizito is offline
Antithasys
Moderator
Join Date: Apr 2008
Old 09-23-2011 , 17:54   Re: [CS:S] RankMe (Version 2.4.5 - 20 Sep 11)
Reply With Quote #413

Quote:
Originally Posted by lokizito View Post
I may be wrong but i did that to make sure the version cvar would be changed if updated the plugin, or the flags will make that?
PLUGIN_VERSION is your define... change that and its changed.


Quote:
Originally Posted by lokizito View Post
The problem is that i am already creating the command. What i want is that, besides the command's triggers (! and /) to make possible use it without any trigger. (e.g: rank, top, top10)
How should that be done? Searched for ChatTrigger in the Documentation and only found the IsChatTrigger() .
Creating a command with the sm_ prefix automatically creates the chat triggers ! and /. So sm_test works with !test, and /test. Relying on 1 word chat messages to run commands is bad practice. Don't code for lazy users.
__________________
[my plugins]

When you think about asking a question... consider what have you tried?
Antithasys is offline
lokizito
Veteran Member
Join Date: Dec 2010
Location: Brazil
Old 09-23-2011 , 18:04   Re: [CS:S] RankMe (Version 2.4.5 - 20 Sep 11)
Reply With Quote #414

Quote:
Originally Posted by Antithasys View Post
PLUGIN_VERSION is your define... change that and its changed.
Not that. I'm saying that, for example, i'm running an old version, and then i update it and just reload the plugin. If i don't set it, won't the cvar be with the old value? Or PLUGIN_VERSION will take care of that?

Quote:
Originally Posted by Antithasys View Post
Creating a command with the sm_ prefix automatically creates the chat triggers ! and /. So sm_test works with !test, and /test. Relying on 1 word chat messages to run commands is bad practice. Don't code for lazy users.
The thing is that the majority of players are lazy users. And also, Mani, gameMe and HLStatsX uses the chat message, so i added that for confort to players if they come from those rank systems.

For the CVars, do i need to create one callback for each or can simply use if's with the Handle:convar?
__________________
[CS:S] RankMe - Why pay for a rank plugin if you can have one for free?
[CS:S] RankMe Connect Announcer - Announce when a player connect
Translation Project - Let's make the plugins to be international
lokizito is offline
Antithasys
Moderator
Join Date: Apr 2008
Old 09-23-2011 , 18:31   Re: [CS:S] RankMe (Version 2.4.5 - 20 Sep 11)
Reply With Quote #415

Quote:
Originally Posted by lokizito View Post
Not that. I'm saying that, for example, i'm running an old version, and then i update it and just reload the plugin. If i don't set it, won't the cvar be with the old value? Or PLUGIN_VERSION will take care of that?
The version listed in sm plugins list will show the correct number. The version in the cvar will not unless you unload and load... not reload. That is by design, but I see your point. I am not requiring a change, just thought it was odd and a little dirty.

Quote:
Originally Posted by lokizito View Post
The thing is that the majority of players are lazy users. And also, Mani, gameMe and HLStatsX uses the chat message, so i added that for confort to players if they come from those rank systems.
I understand your point, but neither I, nor the current staff, would approve a plugin that does this. If you insist on this type of functionality, the most that would be acceptable is hooking the usermessage or incorporating the forwards from the chat processor I recently released. This method doesn't interfere with the say and sayteam commands.

As a side note, handling chat like this is exactly why the old Simple Chat Colors was unapproved and discontinued.

Quote:
Originally Posted by lokizito View Post
For the CVars, do i need to create one callback for each or can simply use if's with the Handle:convar?
Both methods are ok. I would do if, else if, statements to keep it all under 1 function.
__________________
[my plugins]

When you think about asking a question... consider what have you tried?
Antithasys is offline
lokizito
Veteran Member
Join Date: Dec 2010
Location: Brazil
Old 09-23-2011 , 18:53   Re: [CS:S] RankMe (Version 2.4.5 - 20 Sep 11)
Reply With Quote #416

Quote:
Originally Posted by Antithasys View Post
The version listed in sm plugins list will show the correct number. The version in the cvar will not unless you unload and load... not reload. That is by design, but I see your point. I am not requiring a change, just thought it was odd and a little dirty.
Now I understand.

Quote:
Originally Posted by Antithasys View Post
I understand your point, but neither I, nor the current staff, would approve a plugin that does this. If you insist on this type of functionality, the most that would be acceptable is hooking the usermessage or incorporating the forwards from the chat processor I recently released. This method doesn't interfere with the say and sayteam commands.

As a side note, handling chat like this is exactly why the old Simple Chat Colors was unapproved and discontinued.
Can you post me the link to the chat processor you released?

Quote:
Originally Posted by Antithasys View Post
Both methods are ok. I would do if, else if, statements to keep it all under 1 function.
I'm doing the if, else if.
__________________
[CS:S] RankMe - Why pay for a rank plugin if you can have one for free?
[CS:S] RankMe Connect Announcer - Announce when a player connect
Translation Project - Let's make the plugins to be international
lokizito is offline
lokizito
Veteran Member
Join Date: Dec 2010
Location: Brazil
Old 09-23-2011 , 21:14   Re: [CS:S] RankMe (Version 2.5.0 - 23 Sep 11)
Reply With Quote #417

New version posted. (Fix, Features and Changes)
See first post for changelog.
__________________
[CS:S] RankMe - Why pay for a rank plugin if you can have one for free?
[CS:S] RankMe Connect Announcer - Announce when a player connect
Translation Project - Let's make the plugins to be international
lokizito is offline
GrO
Veteran Member
Join Date: Jun 2010
Location: Poland
Old 09-24-2011 , 08:12   Re: [CS:S] RankMe (Version 2.5.0 - 23 Sep 11)
Reply With Quote #418

Quote:
Originally Posted by lokizito View Post
New version posted. (Fix, Features and Changes)
See first post for changelog.
Something is wrong with version 2.5.0:

- typing rank spams the chat with multiple displays of ranking
- players can't use the chat at all, everything is blocked now

Can You temporarily post version 2.4.5 here, cause I've deleted the old version and people are spamming me, cause I had to disable RankMe plugin?

EDIT:
I've got the previous version from sourceforge.

BTW, what's rankme.sq3-journal file?

Last edited by GrO; 09-24-2011 at 10:54.
GrO is offline
lokizito
Veteran Member
Join Date: Dec 2010
Location: Brazil
Old 09-24-2011 , 11:12   Re: [CS:S] RankMe (Version 2.5.0 - 23 Sep 11)
Reply With Quote #419

Thank GrO. Will look at it. I've removed the download and will put it back when i fix it.
__________________
[CS:S] RankMe - Why pay for a rank plugin if you can have one for free?
[CS:S] RankMe Connect Announcer - Announce when a player connect
Translation Project - Let's make the plugins to be international
lokizito is offline
GrO
Veteran Member
Join Date: Jun 2010
Location: Poland
Old 09-24-2011 , 15:48   Re: [CS:S] RankMe (Version 2.5.0 - 23 Sep 11)
Reply With Quote #420

No problem.

Quote:
Originally Posted by GrO View Post
BTW, what's rankme.sq3-journal file?
GrO 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 12:18.


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