sounds don't play from folder [Pirates, vikings, Knight 2]
the plugin works but does not download the sounds, I found my old plugin that plays random sounds when the kegs are killed, the plugin itself works but the sounds are not cached, what could be the problem? Or is it worth just adding a separate plugin that will put the sounds on the download?, the full name of the weapon (powderkeg) :grrr:
P.S I also tried to change the directory of the folder, it did not help Server Console Error: SV_StartSound: *powderkegz4.mp3 not precached (0) SV_StartSound: *powderkegz3.mp3 not precached (0) SV_StartSound: *powderkegz1.mp3 not precached (0) SV_StartSound: *powderkegz3.mp3 not precached (0) SV_StartSound: *powderkegz1.mp3 not precached (0) SV_StartSound: *powderkegz2.mp3 not precached (0) |
Re: sounds don't play from folder [Pirates, vikings, Knight 2]
the plugin works but the sounds are not downloading...
#include <sourcemod> #include <sdktools> char g_sWSSounds[][] = { "*powderkegz1.mp3", "*powderkegz2.mp3", "*powderkegz3.mp3", "*powderkegz4.mp3" }; int g_iLen = -1; public Plugin myinfo = { name = "Keg Death Sound", author = "ORdli", version = "1.0", }; public void OnPluginStart() { HookEvent("player_death", Event_PlayerDeath); } public void OnMapStart() { char sBuffer[256]; g_iLen = sizeof(g_sWSSounds); for(int i = 0; i < g_iLen; i++) { Format(sBuffer, 256, "sound/explosion_rndsound/%s", g_sWSSounds[i][1]); if(FileExists(sBuffer) || FileExists(sBuffer, true)) { AddFileToDownloadsTable(sBuffer); AddToStringTable(FindStringTable("soundprecac he"), g_sWSSounds[i]); } } } public Action Event_PlayerDeath(Event ev, const char[] name, bool dbc) { char sWeapon[64]; ev.GetString("weapon", sWeapon, 64); if(strcmp(sWeapon, "powderkeg", true) == 0) { int random = GetRandomInt(0, g_iLen-1); EmitSoundToAll(g_sWSSounds[random]); } } |
| All times are GMT -4. The time now is 05:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.