Quote:
Originally Posted by abdobiskra
When i add more than 3 sounds become Random !
|
Does not make sense that. Could you show your full code? (
attach the file)
Update:
If you want to save a function call, use this:
Code:
#include <amxmodx>
#include <fun>
#define VERSION "1.0"
#define NEXT_SOUND_TO_PLAY() \
g_current_sound = ( g_current_sound + 1 ) % sizeof Sounds
new Sounds[ 3 ][ 64 ] = { "son/sound0.wav", "son/sound1.wav", "son/sound2.wav" }
new g_current_sound = -1
public plugin_init()
{
register_plugin( "Test", VERSION, "Addons zz" );
register_concmd( "amx_next", "next", ADMIN_CFG, "Test" )
}
public next()
{
NEXT_SOUND_TO_PLAY()
server_print( "^n^n^nHERE: %s^n^n^n", Sounds[ g_current_sound ] )
}