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

Background Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
swmajid2010
Member
Join Date: Mar 2012
Old 11-29-2013 , 09:51   Re: Background Sounds
Reply With Quote #61

where to put the songs ??? where to add lines of songs to be played??
swmajid2010 is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 11-29-2013 , 10:13   Re: Background Sounds
Reply With Quote #62

Quote:
Originally Posted by swmajid2010 View Post
where to put the songs ???
Quote:
Originally Posted by nikhilgupta345 View Post
If you are using the default sounds from below, click on 'resources.zip' from below and extract it to your cstrike folder.
Restart server or change map
in the folder cstrike/sound
Quote:
Originally Posted by swmajid2010 View Post
where to add lines of songs to be played??
Quote:
Originally Posted by nikhilgupta345 View Post
If you wish to have specific sounds play on a certain map, create a new folder called sounds in your configs folder. (addons/amxmodx/configs/sounds), and then create a new ini file with the mapname. (Ex. de_dust2.ini)
Quote:
Originally Posted by ANTICHRISTUS View Post
the main post is already explaining everything, about using the plugin with specific maps, but it's not explaining how to use it for default maps without editing the .sma.
__________________
ANTICHRISTUS is offline
swmajid2010
Member
Join Date: Mar 2012
Old 11-30-2013 , 03:45   Re: Background Sounds
Reply With Quote #63

thanks buddy great plugin +1 from me
swmajid2010 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-17-2014 , 11:53   Re: Background Sounds
Reply With Quote #64

Here some review. I don't see major issue, though some things you could consider/check/improve (always welcomed!) :
  • g_bFileExists is not used in others functions. I guess it's safe to remove it.
  • file_exists is redundant as you can check it with fopen after.
  • Which means you should always create your variables after the conditions when possible.
  • About config parsing:
    • It would be a good idea to check for comments (// ; #)
    • Checking if line is empty will avoid unnecessary calls
    • I guess you could replace trim + remove_quote by parse, it should remove space and quotes.
    • You should remove "sound/" when precaching WAV, something like: szBuffer[6]
    • Technically precache_* could fail, even if unliky. I would do: bSuccess = !!precache_*(...)
    • It seems more appropriate to check last x characters rather using contain as you could have file wrongly named but still valid.
    • You should avoid duplicated code for several reasons like maintenablity or readability ; the parsing code could be extracted in another function. the calling this function with current path.
    • A detail but check with bSuccess should be done above (inside else condition).
    • When you check iSize you could also destroy dynamic array.
  • it doesn't hurt to cache g_aSounds array size before.
  • spk command doesn't need 'sound/'.
  • You may want to know WAV/MP3 file length using this lib. You could also check if file is valid with it it seems. Something to check. Something to check.
  • I'm not sure to like you use 'stopsound' as generally WAV are often used and several sounds can be played at the time for different purposes. I think you should try to use another method. Maybe emitting a sound with some flags to be heard from everwhere (entity? emit_sound?). I thing I have done that once, and then you would not interfere with others WAV and could control more easily.
  • Caching duration length would be a good idea, though considering context, it's not that a big deal.

That's all for now.
__________________

Last edited by Arkshine; 03-17-2014 at 11:54.
Arkshine is offline
blanko
Senior Member
Join Date: Aug 2008
Old 05-05-2014 , 02:23   Re: Background Sounds
Reply With Quote #65

Didn't work here, tell us better about the sounds folder and file names for them.
__________________
blanko is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 05-05-2014 , 04:30   Re: Background Sounds
Reply With Quote #66

no offence amigo, but..
__________________
ANTICHRISTUS is offline
blanko
Senior Member
Join Date: Aug 2008
Old 05-05-2014 , 05:54   Re: Background Sounds
Reply With Quote #67

Quote:
Originally Posted by ANTICHRISTUS View Post
no offence amigo, but..
Done! Still not working here, cstrike 1.6
__________________
blanko is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-15-2014 , 12:38   Re: Background Sounds
Reply With Quote #68

No answer since last review. Unapproved for now. Feel free to ask to be reviewed again once changes are done.
__________________
Arkshine 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 11:43.


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