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

[ANY] Admin Join Sound


Post New Thread Reply   
 
Thread Tools Display Modes
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 12-31-2014 , 07:30   Re: [ANY] Admin Join Sound
Reply With Quote #51

Quote:
Originally Posted by Peace-Maker View Post
Sounds (and everything else) need to be precached again for every map. You should move the precaching and adding to downloadables into OnMapStart and just use and cache whatever string is set in the sm_adminjs_path convar then.
Like this? I used OnConfigsExecuted, as the convar isn't set yet if I use OnMapStart (as I understand).
Attached Files
File Type: sp Get Plugin or Get Source (admin-join-sound.sp - 384 views - 1.4 KB)
klausenbusk is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-02-2015 , 18:30   Re: [ANY] Admin Join Sound
Reply With Quote #52

Hey klausenbusk,

looking at your plugin, I wonder : do you really need to call FileExists twice ? (this and this makes me believe it should be good without calling it twice.

I also find the way you precache the file in 1.7 a bit confusing (but "acceptable"). However why don't you ever assign SoundPath (in your 1.7) ? And in your 1.6 you can never change your sm_adminjs_path path ConVar once it is set...

You should allow people to change the convar and let them change the map, as it was always made in ~all the other plugins. You're forcing them to reload the plugin to change a ConVar, which doesn't seem reasonable...

Regarding OnMapStart / OnConfigExecuted; a lot of plugins use either of those two, which in most case are acceptable. They're also both execute in late load AFAICR. I'd use OMS in your case as it is executed a bit sooner; but I don't think it really matters in your case.

Red
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 03-02-2015 at 18:35.
RedSword is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 03-03-2015 , 14:35   Re: [ANY] Admin Join Sound
Reply With Quote #53

Quote:
Originally Posted by RedSword View Post
Hey klausenbusk,

looking at your plugin, I wonder : do you really need to call FileExists twice ? (this and this makes me believe it should be good without calling it twice.
Didn't know, the plugin is from 2011.. Maybe the documentation was worse at that point, or my English was

Quote:
Originally Posted by RedSword View Post
I also find the way you precache the file in 1.7 a bit confusing (but "acceptable"). However why don't you ever assign SoundPath (in your 1.7) ?
Confusing how? SoundPath fail :/

Quote:
Originally Posted by RedSword View Post
And in your 1.6 you can never change your sm_adminjs_path path ConVar once it is set...


You should allow people to change the convar and let them change the map, as it was always made in ~all the other plugins. You're forcing them to reload the plugin to change a ConVar, which doesn't seem reasonable...
Forget 1.6, I don't want to update the main thread, before I have a version you can approve..

Quote:
Originally Posted by RedSword View Post
Regarding OnMapStart / OnConfigExecuted; a lot of plugins use either of those two, which in most case are acceptable. They're also both execute in late load AFAICR. I'd use OMS in your case as it is executed a bit sooner; but I don't think it really matters in your case.

Red
I see..


What do you think, about this version?
Attached Files
File Type: sp Get Plugin or Get Source (admin-join-sound.sp - 292 views - 1.5 KB)
klausenbusk is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-03-2015 , 16:03   Re: [ANY] Admin Join Sound
Reply With Quote #54

Quote:
What do you think, about this version?
Remove FCVAR_REPLICATED, as well as the "Can't be changed after it have been set!" part of your CVar definition (since that's not the case anymore). I'm still considering if you can be approved as it is ~superded by https://forums.alliedmods.net/showthread.php?t=238970 (I think I would still approve due to your CheckCommandAccess)
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 03-03-2015 at 16:08.
RedSword is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 03-03-2015 , 16:34   Re: [ANY] Admin Join Sound
Reply With Quote #55

Quote:
Originally Posted by RedSword View Post
Remove FCVAR_REPLICATED, as well as the "Can't be changed after it have been set!" part of your CVar definition (since that's not the case anymore). I'm still considering if you can be approved as it is ~superded by https://forums.alliedmods.net/showthread.php?t=238970 (I think I would still approve due to your CheckCommandAccess)
Done..
Attached Files
File Type: sp Get Plugin or Get Source (admin-join-sound.sp - 332 views - 1.4 KB)
klausenbusk is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-03-2015 , 16:44   Re: [ANY] Admin Join Sound
Reply With Quote #56

Looks ok. Update your first post and I'll approve.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 03-05-2015 , 10:19   Re: [ANY] Admin Join Sound
Reply With Quote #57

Quote:
Originally Posted by RedSword View Post
Looks ok. Update your first post and I'll approve.
Done..
klausenbusk is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-05-2015 , 13:05   Re: [ANY] Admin Join Sound
Reply With Quote #58

Approved.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
poel
Veteran Member
Join Date: Mar 2013
Old 06-06-2015 , 17:56   Re: [ANY] Admin Join Sound
Reply With Quote #59

Hi

I can't understand why your plugin doesnt works for me

All the time I have :
[Sound] S_StartSound(): Failed to load sound 'misc\admin\dominating.mp3'. Can't create mixer.


I tried with many "sounds", and same all the time.
And this sounds works fine with others plugins so, sounds works in csgo.

Can you help me?
poel is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 06-06-2015 , 18:07   Re: [ANY] Admin Join Sound
Reply With Quote #60

Quote:
Originally Posted by poel View Post
Hi

I can't understand why your plugin doesnt works for me

All the time I have :
[Sound] S_StartSound(): Failed to load sound 'misc\admin\dominating.mp3'. Can't create mixer.


I tried with many "sounds", and same all the time.
And this sounds works fine with others plugins so, sounds works in csgo.

Can you help me?
This happens not only with this plugin. I'm curious as well to know where that problem comes from and how to solve it.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword 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 22:15.


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