Raised This Month: $ Target: $400
 0% 

sounds don't play from folder [Pirates, vikings, Knight 2]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ORdli
Member
Join Date: Nov 2021
Old 04-09-2023 , 16:59   sounds don't play from folder [Pirates, vikings, Knight 2]
Reply With Quote #1

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)

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)

Last edited by ORdli; 05-01-2023 at 17:39. Reason: Plugin doesn't download sounds [PVKII]
ORdli is offline
ORdli
Member
Join Date: Nov 2021
Old 04-30-2023 , 18:22   Re: sounds don't play from folder [Pirates, vikings, Knight 2]
Reply With Quote #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]);
}
}

Last edited by ORdli; 04-30-2023 at 18:25.
ORdli is offline
Reply



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


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