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

Death Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
elitetaco
Junior Member
Join Date: Jan 2009
Location: You know the answer to t
Old 03-22-2011 , 23:51   Re: Death Sounds
Reply With Quote #11

Great Job Drekes! This is very Fun to have in servers
__________________
You can always Find me at Supercentral

Assosiated with
At All Cost
Revo Gaming
elitetaco is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-23-2011 , 00:04   Re: Death Sounds
Reply With Quote #12

I'm confused. Why would you do this:

PHP Code:
    switch(szSound[strlen(szSound) - 1])
    {
        case 
'v''V':
            
client_cmd(iVictim"spk ^"sound/%s^""szSound);
            
        case 
'3':
            
client_cmd(iVictim"mp3 play ^"%s^""szSound);
    } 
and

Code:
; sound/misc/example.mp3^n^n; Be sure to write sound/ when the file is a .mp3^n
Why not just add the "sound/" in the mp3 situation just like you do in the wave situation? Then, you don't need to worry about putting wavs and mp3s in the .ini file differently.

EDIT: Just realized it was because of the precache_generic() BUT you could just add "sound/" when precaching mp3s. This would make it more "user friendly".
__________________
fysiks is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-23-2011 , 00:16   Re: Death Sounds
Reply With Quote #13

Quote:
Originally Posted by fysiks View Post
EDIT: Just realized it was because of the precache_generic() BUT you could just add "sound/" when precaching mp3s. This would make it more "user friendly".
will do.

EDIT: Done
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 03-23-2011 at 00:37.
drekes is offline
Send a message via MSN to drekes
Old 03-23-2011, 00:36
drekes
This message has been deleted by drekes. Reason: Fail
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-23-2011 , 02:46   Re: Death Sounds
Reply With Quote #14

You musn't (don't have to ? w/e) pass 'sound/' in wav play cmd.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-23-2011 , 08:08   Re: Death Sounds
Reply With Quote #15

You should not register the event if no sounds were found from the parsing.

Also, I would suggest to format directly the sound with spk or mp3 play at parsing time before saving in the array, so you can use directly something like that :

Code:
public EventDeathMsg() {     client_cmd( read_data( 2 ), "%a", ArrayGetStringHandle( g_aSounds, g_iTotalSounds == 1 ? 0 : random( g_iTotalSounds ) ) ); }
__________________
Arkshine is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-23-2011 , 09:30   Re: Death Sounds
Reply With Quote #16

Quote:
Originally Posted by ConnorMcLeod View Post
You musn't (don't have to ? w/e) pass 'sound/' in wav play cmd.
I've tried with and without /sound for .wav files, and it seems to work with both, so what is the difference ?

Quote:
Originally Posted by Arkshine View Post
You should not register the event if no sounds were found from the parsing.

Also, I would suggest to format directly the sound with spk or mp3 play at parsing time before saving in the array, so you can use directly something like that :

Code:
public EventDeathMsg() { client_cmd( read_data( 2 ), "%a", ArrayGetStringHandle( g_aSounds, g_iTotalSounds == 1 ? 0 : random( g_iTotalSounds ) ) ); }
I'll update it once i have received an answer from Connor for the question above.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
GuTo
Senior Member
Join Date: Mar 2010
Location: Brazil - SP
Old 03-23-2011 , 10:03   Re: Death Sounds
Reply With Quote #17

cool man
__________________
GuTo is offline
Send a message via Skype™ to GuTo
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 03-23-2011 , 11:03   Re: Death Sounds
Reply With Quote #18

Also you should use formatex where applicable.
dark_style is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-23-2011 , 11:27   Re: Death Sounds
Reply With Quote #19

Quote:
Originally Posted by dark_style View Post
Also you should use formatex where applicable.
I know but it isn't applicable in this code.
This is the only format() i use:
PHP Code:
format(szDatacharsmax(szData), "sound/%s"szData); 
As you can see, i use szData[] as output, but also use szData as the 4th param, which isn't possible with formatex()
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 03-23-2011 , 11:47   Re: Death Sounds
Reply With Quote #20

Sorry, my fault. The idea of the plugin is good, but you should add more features.
dark_style 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 10:04.


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