Ulysses Stuff > Releases for ULX v1.*

Playsounds plugin

<< < (2/4) > >>

darkdeath:
looks good but it says this:


this is what my forcedownload looks like:

--- Quote ---//ULX-Dynamic res generator
//Put files you wish to force the client to download in this file, seperated by newlines.
//For example, you might put "sound/supafly.mp3" in here, make sure it has the quotes.
//DO NOT CHANGE THESE COMMENTS.
"sound/d-sounds/bye.mp3"
"sound/d-sounds/english.wav"
"sound/d-sounds/haha.wav"
"sound/d-sounds/lol.mp3"

--- End quote ---

in my sounds folder is another folder d-sounds in the folder are afcourse the :
bye.mp3
english.wav
haha.wav
lol.mp3

Then here is my ulx_playsounds.lua:

--- Quote ---playsounds = true;
soundtext = "";


function eventPlayerSay(userid, strText, bTeam)
if(playsounds == true) then

local strCompare = string.lower(strText);
local bye = string.find(strCompare, "bye", 1, true);
local english = string.find(strCompare, "english", 1, true);
local haha = string.find(strCompare, "haha", 1, true);
local lol = string.find(strCompare, "lol", 1, true);



if (bye ~= nil) then
_PlaySound("d-sounds/bye.mp3")
soundtext = "<PlaySound> " .. strText
return soundtext;
elseif (english ~= nil) then
_PlaySound("d-sounds/english.wav")
soundtext = "<PlaySound> " .. strText
return soundtext;
elseif (haha ~= nil) then
_PlaySound("d-sounds/haha.wav")
soundtext = "<PlaySound> " .. strText
return soundtext;
elseif (lol ~= nil) then
_PlaySound("d-sounds/lol.mp3")
soundtext = "<PlaySound> " .. strText
return soundtext;
else
return strText;
end
else
return strText;
end
end

function cc_ulxPlaysounds()

if (playsounds == false) then
playsounds = true;
Msg("Playsounds Enabled.\n")
elseif (playsounds) then
playsounds = false
Msg("Playsounds Disabled.\n")
end

return true;
end
ULX_CONCOMMAND( "ulx_playsounds", cc_ulxPlaysounds, ACCESS_CUSTOM_A, " : enables or disables playsounds ",1, "ulx_playsounds")

--- End quote ---

and this is what my ulx_init.lua looks like:

--- Quote ---_OpenScript( "ulx/ulx_defines.lua" ) -- ULX defines
_OpenScript( "ulx/ulx_lib.lua" ) -- ULX helper functions
_OpenScript( "ulx/ulx_base.lua" ) -- Base functions needed by ULX
_OpenScript( "ulx/ulx_config.lua" ) -- ULX configuration
_OpenScript( "ulx/ulx_users.lua" ) -- This is where our users for ULX are kept
_OpenScript( "ulx/ulx_util.lua" ) -- ULX utility functions ( IE ulx_who )
_OpenScript( "ulx/ulx_fun.lua" ) -- Fun commands ( IE ulx_slay )
_OpenScript( "ulx/ulx_menu_base.lua" ) -- Do I really need to explain this?
_OpenScript( "ulx/ulx_menus.lua" ) -- ULX menus
_OpenScript( "ulx/ulx_props.lua" ) -- Prevents prop spamming and protects props
_OpenScript( "ulx/ulx_end.lua" ) -- Has some clean up functions, sorts the help
_OpenScript( "newscripts/chimneyblock.lua" ) -- For ppl who try to spawn a chimney *NEW* 
_OpenScript( "newscripts/invisible.lua" ) -- Invisible mode 1,2,3 *NEW* 
_OpenScript( "newscripts/textfloatuncvar.lua" ) -- Text floating above your head *NEW*
_OpenScript( "newscripts/playsounds.lua" ) -- Play sounds in game

--- End quote ---

i don't get what the problem is !

Megiddo:
Please update this plugin to use ULX v1.1's new module system

InstantDeath:
sure... ill see what i can do.

and darkdeath, why do you have a 1 added to the the variable soundtext? thats not needed and could have the wrong effect.

darkdeath:
yes maby... ill try again :)...
and thx for updating :)

EDIT:
still aint working !
same message and same fault

InstantDeath:
try putting the script in the modules folder instead of adding the script to the ulx init.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version