Raised This Month: $32 Target: $400
 8% 

UTSounds


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-09-2009 , 01:25   Re: UTSounds
Reply With Quote #11

Damn, again one of these
Multi-messages + ML would be better for such a plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Flasher
Senior Member
Join Date: Apr 2008
Old 09-09-2009 , 01:40   Re: UTSounds
Reply With Quote #12

Quote:
Originally Posted by ConnorMcLeod View Post
Damn, again one of these

Quote:
Originally Posted by ConnorMcLeod View Post
Multi-messages + ML would be better for such a plugin.
Multi-messages = several messages for one event picked by random?
ML: Sounds are in english. So messages too. If you have translated sounds no one stops you from modifying ini file to match your language. If I will make it ML then I have to use ML tags in ini file and have matching ML file. This makes not easy modifying announcements levels. So it cuts both ways.
Flasher is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-09-2009 , 02:37   Re: UTSounds
Reply With Quote #13

- Yes
- It doesn't matter really if the sound don't match the messages, it's up to the admin to change the sounds. But when you have client text message, ML should be always used.
__________________
Arkshine is offline
Flasher
Senior Member
Join Date: Apr 2008
Old 09-09-2009 , 02:42   Re: UTSounds
Reply With Quote #14

- May be later.
- Also may be later.
Time is a gold. So everyone decide how to spend it.
Flasher is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-09-2009 , 02:57   Re: UTSounds
Reply With Quote #15

About your code, just minors things :

- You hook say and say_team, I would hook the command with register_clcmd(), it will avoid to call 2 natives each time someone types something. Letting the engine doing the check is better.
- equali(temp, "0"), you can do directly : temp[0] == '0'
- About the hook of player's spawn, use Ham_spawn to hook properly. There is a tuto about that in the tutorials section. ( page 4 or 5 )
- The loop using MAX_PLAYERS is not right. The right value is from get_maxplayers() ( max slot of server ). Use a global var.
- To avoid unnecessary natives calls, I would use get_players() to get a list of connected player.
__________________

Last edited by Arkshine; 09-09-2009 at 03:03.
Arkshine is offline
Flasher
Senior Member
Join Date: Apr 2008
Old 09-09-2009 , 07:40   Re: UTSounds
Reply With Quote #16

Quote:
Originally Posted by Arkshine View Post
About your code, just minors things :

- You hook say and say_team, I would hook the command with register_clcmd(), it will avoid to call 2 natives each time someone types something. Letting the engine doing the check is better.
- equali(temp, "0"), you can do directly : temp[0] == '0'
- About the hook of player's spawn, use Ham_spawn to hook properly. There is a tuto about that in the tutorials section. ( page 4 or 5 )
- The loop using MAX_PLAYERS is not right. The right value is from get_maxplayers() ( max slot of server ). Use a global var.
- To avoid unnecessary natives calls, I would use get_players() to get a list of connected player.
Thanks for your time!
- I tried register_clcmd(). It works for "say /utsounds", but not for "say /utsounds on". So I have to use say and say_team. This is not so terrible I think.
- temp[0] == '0'. Ok.
- Ham_spawn - I will give it a look.
- About players - I get your point.
Flasher is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 09-09-2009 , 09:14   Re: UTSounds
Reply With Quote #17

Ham_Spawn() will preform your hook much faster and more efficiently.

About your register_clcmd() issue, this is probably because of the third space for the word "on".
BOYSplayCS is offline
Flasher
Senior Member
Join Date: Apr 2008
Old 09-09-2009 , 10:18   Re: UTSounds
Reply With Quote #18

I tried
RegisterHam(Ham_Spawn, "player", "playerSpawn", 1);
but is_user_alive(id) is 0 at playerSpawn(id).
Mod - pure HLDM.

register_clcmd() - I did this such:
register_clcmd("say /utsounds", "cmdInfo");
register_clcmd("say /utsounds on", "cmdOn");
register_clcmd("say /utsounds off", "cmdOff");

And only cmdInfo was triggered (on "say /utsounds on" nothing was triggered).
May be this is because HL client convert say command to this:
say "/utsounds on"
?
Flasher is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-09-2009 , 10:37   Re: UTSounds
Reply With Quote #19

Quote:
Originally Posted by Arkshine View Post
[...] ML should be always used.
omg
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Contrenature
Member
Join Date: Nov 2008
Location: Latvia, Liepaya, Riga
Old 09-09-2009 , 11:11   Re: UTSounds
Reply With Quote #20

Nothing special, old sounds.
We have much better sounds effects, if some interesning, send me PM!
Contrenature is offline
Send a message via Skype™ to Contrenature
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:28.


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