AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Random Startsound (https://forums.alliedmods.net/showthread.php?t=215363)

m4m3ts 05-06-2013 23:05

[HELP] Random Startsound
 
1 Attachment(s)
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 
0sizeof(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_cmd0"spk %s"g_szSound[randomsizeof(g_szSounds))]);


it say undefined symbol g_szSound, but it already "new const g_szSound"

meTaLiCroSS 05-06-2013 23:36

Re: [HELP] Random Startsound
 
I think that it's too diferent g_szSound from g_szSounds

m4m3ts 05-07-2013 03:27

Re: [HELP] Random Startsound
 
Quote:

Originally Posted by meTaLiCroSS (Post 1947272)
I think that it's too diferent g_szSound from g_szSounds

OMG !!
my baaddd !!!

close this thread !


All times are GMT -4. The time now is 10:45.

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