PLease help i want to play random sound at every start round.
PHP Code:
#include <amxmodx>
#include <cstrike>
new const g_szSound[][] =
{
"testsound/a.wav",
"testsound/b.wav",
"testsound/c.wav",
"testsound/d.wav",
"testsound/e.wav"
}
public plugin_precache()
{
for(new i = 0; i < sizeof(g_szSounds); i++)
precache_sound(g_szSounds[i])
}
public plugin_init()
{
register_plugin( "Start Round Sound", "1.0", "Tonev" )
register_logevent( "Event_Round_Start", 2, "1=Round_Start" )
}
public Event_Round_Start()
{
client_cmd( 0, "spk %s", g_szSound[random( sizeof(g_szSounds))]);
}
it say undefined symbol g_szSound, but it already
"new const g_szSound"