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

CS:GO Music Kit


Post New Thread Reply   
 
Thread Tools Display Modes
BeNq!
Senior Member
Join Date: Mar 2009
Old 07-14-2016 , 10:42   Re: CS:GO Music Kit
Reply With Quote #11

Quote:
Originally Posted by BeNq! View Post
AD 1. This would give the council extend the end of the round?
AD 2. "STARTACTION" shoult be switched on after the passage of x meters from resp.
Please answer.
BeNq! is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-14-2016 , 11:10   Re: CS:GO Music Kit
Reply With Quote #12

Quote:
Originally Posted by hellmonja View Post
I know how you guys hate hardcoding but I had to hardcode variable sounds' character length for now. When I use charmax() is gives me errors. (line 237)
I just used charsmax and compiles. Note, you used the sound as sound[40], and when formatting it:
Code:
formatex(sound, 40, "%s%s", FOLDER[iFolder], WONROUND);
It is not 40, it is 39 because one last space is used always as '^0' to determine the end of the string.
40 is also a little to critic, because you are using things bigger as 38 chars, them it almost do not fit in.
And as it is supposed in the future let the users to configure the sounds by config files, would be nice to allow
them to write paths as big as 96 or 128 characters length.

Spoiler
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 07-19-2016 at 20:56. Reason: update boring
addons_zz is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 07-17-2016 , 14:27   Re: CS:GO Music Kit
Reply With Quote #13

Quote:
Originally Posted by BeNq! View Post
Please answer.
I'm sorry. I don't understand any of it. If you're referring to how the 'startaction' sound begins to play after the player has moved then I'm sorry to say that I won't try to replicate that anytime soon. I'm trying to keep my plugin as simple as possible and finish it. Then I'll begin adding the fancy stuff.

Quote:
Originally Posted by addons_zz View Post
Registering log events to each one of them seems more appropriate
I was thinking of a better way and thought trying to hook everything in the TeamScore event. But it keeps crashing. I'm using this:
PHP Code:
register_event("TeamScore""Event_Team_Score""a"); 
But even with an empty function. For example:
PHP Code:
Event_Team_Score()
{


It still crashed and I don't know why. Others doesn't seem to have a problem with it.

Quote:
Originally Posted by addons_zz View Post
I just used charsmax and compiles.
How? I doing it like this:
PHP Code:
new sound[charsmax(FOLDER[iFolder]) + charsmax(LOSTROUND)]; 
It doesn't compile...
__________________
hellmonja is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-18-2016 , 04:44   Re: CS:GO Music Kit
Reply With Quote #14

addons_zz:
Quote:
Also, is a convention to use UPPERCASE letters for constants. Exemple:
Told you before, coding style should not be part of a review. You can give suggestions, but don't present them as general truth and a big deal. Such convention likely doesn't matter.
Being consistent is the only thing that matter regarding coding style.

Quote:
I do not see any comments on you code or documentation on your code.
They help to understand the system and to develop them. See what do you think about this mime.
Should not be part of a review, up to the coder.

Quote:
Let us see. This line:
Code:
client_cmd(id, "mp3 play ^"%s^"", WONROUND);
It is very repetitive and that is not good. I do it sometimes when I am not paying attention. But when I see them, I create a stock for them, or macro. On this case, a macro would fit good. I am thinking something like this:
It's a native call for God Sake, how it's not good? One should avoid duplicating code, but when it comes to a simple native call, there is nothing wrong. Creating a macro is stupid and could actually decrease readability.

Quote:
But, this message event stills existing:
register_message(get_user_msgid("TextMsg"), "Event_End_Round");
Why are you so turned on about this? Apart of function name not being the best choose, it's okay.

I did not read all, because you are mostly suggesting macros when there is no valid reason to do so or a simple private function would be likely more appropiate.

As I said before, plugin needs to be changed if you want it to be reviewed and approved. Since section needs to be cleaned I'll unapprove it for now. Do what I suggested in previous post and if you are not sure how to design this or need some help, ask.
__________________

Last edited by HamletEagle; 07-18-2016 at 04:45.
HamletEagle is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 07-18-2016 , 09:15   Re: CS:GO Music Kit
Reply With Quote #15

Quote:
Originally Posted by HamletEagle View Post
As I said before, plugin needs to be changed if you want it to be reviewed and approved. Since section needs to be cleaned I'll unapprove it for now.
That's ok. I think it's for the best. It actually didn't occur to me that this belonged to those ideas that won't get approved. If I'd known, I wouldn't have submitted it.

I'd probably discontinue this here and move development some place else. I want to keep it simple for now, just trying to get a feel of making my own plugins from scratch so the config file feature is actually a far off goal for now.

Besides, regarding functionality, it works pretty great. I just can't get that TeamScore thingy to work. Would've made for cleaner code. Anyway, thanks, both of you. I still a learned a lot from this and that's never a bad thing...
__________________
hellmonja is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-18-2016 , 09:47   Re: CS:GO Music Kit
Reply With Quote #16

Just because it's unapproved doesn't mean you should stop working on this.
Quote:
so the config file feature is actually a far off goal for now.
What are you waiting? Make it your current goal. If you never use new stuff you will never progress. Go on scripting help, read tutorials, ask here, whatever you need.
__________________

Last edited by HamletEagle; 07-18-2016 at 09:47.
HamletEagle is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 07-18-2016 , 10:01   Re: CS:GO Music Kit
Reply With Quote #17

Quote:
Originally Posted by HamletEagle View Post
Just because it's unapproved doesn't mean you should stop working on this.

What are you waiting? Make it your current goal. If you never use new stuff you will never progress. Go on scripting help, read tutorials, ask here, whatever you need.
I will. It's just that a lot of stuff's actually going on in my life now: work, kids, some prospect for new business, trying to budget everything and what not. Coding time is mostly stolen time so it's hard for me to finish something. With just one plugin under my belt (thankfully, approved) finishing simple stuff would really give me some confidence and a sense of accomplishment. Then I can work around it and add more features.

Honestly, even in this 'simple' form, optimizing it has been complicated for me...
__________________
hellmonja is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-19-2016 , 20:52   Re: CS:GO Music Kit
Reply With Quote #18

Quote:
Originally Posted by hellmonja View Post
But it keeps crashing. I'm using this:
PHP Code:
register_event("TeamScore""Event_Team_Score""a"); 
But even with an empty function. For example:
PHP Code:
Event_Team_Score()
{


Try to look forward to use/register log_events.


Quote:
Originally Posted by HamletEagle View Post
addons_zz:
Should not be part of a review, up to the coder.
You are right. It must not, it is boring. I just said it because he was beginning. I should explicated better what is what.




Quote:
Originally Posted by HamletEagle View Post
It's a native call for God Sake, how it's not good? One should avoid duplicating code, but when it comes to a simple native call, there is nothing wrong. Creating a macro is stupid and could actually decrease readability.
Yes, it can deteriorate badly if overused/misused. On this case looked like good fitting.

Quote:
Originally Posted by HamletEagle View Post
Why are you so turned on about this? Apart of function name not being the best choose, it's okay.
This is a often called event he is registering just to manually hook (by if's) round drawn, round end, etc.
I am just saying to hook the log_events as round_drawn, team_win, etc, instead use ifs on that more general and called event.


Quote:
Originally Posted by hellmonja View Post
That's ok. I think it's for the best. It actually didn't occur to me that this belonged to those ideas that won't get approved. If I'd known, I wouldn't have submitted it.
I think you got it wrong, was good you submitted it. He is just saing that you plugin will be on another forum section until you finish it your work.
It is only/just a label to your work today. As your code evolves, its labels can evolves also.

Quote:
Originally Posted by hellmonja View Post
Honestly, even in this 'simple' form, optimizing it has been complicated for me...
From my experience, everything I got done took lots of time to learn and apply.
You will work like 8 hours just to write a couple of new lines. Usually, some times you
write a lot, but later you delete almost all, because you find out how to generalize the a idea
and place it inside function/macro and use it elsewhere.

Welcome to the programming world. It is nothing like in the movies where the guy writes code on the light speed.




Spoiler
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 08-10-2016 , 10:29   Re: CS:GO Music Kit
Reply With Quote #19

UPDATE v1.7.3
  • Rewrote the whole thing.
  • Settings are now individualized. Players can choose their kits mid game without affecting others.
  • You can now have up to 99 kits.
  • Flexible system that registers console commands by how many kits you have.
  • Various bugs and fixes.
I don't know how many of you get around Gamebanana, but I've uploaded this at GB a couple of days ago. It works fine and so far doing ok. But I came back here because I recognize it can still be improved. Therefore, I humbly offer this plugin at the mercy of the sages of Allied Modders...
__________________

Last edited by hellmonja; 08-10-2016 at 22:53.
hellmonja is offline
Reply


Thread Tools
Display Modes

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:42.


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