Raised This Month: $ Target: $400
 0% 

[HELP] Random Startsound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
m4m3ts
Senior Member
Join Date: Jun 2012
Old 05-06-2013 , 23:05   [HELP] Random Startsound
Reply With Quote #1

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"
Attached Files
File Type: sma Get Plugin or Get Source (startsound_baru.sma - 495 views - 583 Bytes)
m4m3ts is offline
 



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:45.


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