Problem with playing Sound + StrContains doesn't works
Hello, this is my first time scripting for SourceMod.
I tried to make a joinsound for everyone, so I put my wav into sound/servername/ on the Server and on the Fastdownload in the same. Then here is the plugin: PHP Code:
I fixed it with this PrecacheSound Command, but now it dont play the Sound after joining and it dont show any errors. Please help me, if you can :D So here is my second problem: i check with StrContains if my Steamid exists in another String, that i read from a file. I printed the data of the file and my steamid to the server and my steamid was in the String like that: file: steamid;1;1;1;1 auth: steamid So StrContains should go on to the following commands, but it stops at StrContains..i dont know, why. Please help me :D Thanks and bye, n00bfilter. |
Re: Problem with playing Sound
OnClientPutInServer is ran before you're done Sending Info.
Try putting a timer there instead of playing the sound. Set the timer to 3 seconds, then play the sound. It should work then. |
Re: Problem with playing Sound + StrContains doesn't works
Okay, i'll try it. Can you look at my other problem, while I'm testing?
I edited it to the first post :D Thanks. Is is correct like this: PHP Code:
Okay the timer works, but it don't play the sound. :/ No error message. Why i know the timer works, but not the sound? I printed Test to the Server. Test was printend, sound wasnt played. :/ Please help me, for me it looks correct, so it must work :S |
Re: Problem with playing Sound + StrContains doesn't works
Hook the player_spawn event and check if the player is NOT alive. In that case, their view camera was just spawned, and they can see the map.
|
Re: Problem with playing Sound + StrContains doesn't works
Hello, i hooked the event like this:
PHP Code:
"n00bfilter<2><STEAM_0:0:14636098><Unassigned >" joined team "CT" test Also can you please look at my problem above? I'll post it here again: i check with StrContains if my Steamid exists in another String, that i read from a file. I printed the data of the file and my steamid to the server and my steamid was in the String like that: file: steamid;1;1;1;1 auth: steamid So StrContains should go on to the following commands, but it stops at StrContains..i dont know, why. Please help me :D Code: PHP Code:
|
Re: Problem with playing Sound + StrContains doesn't works
StrContaing retrun notes:
Code:
-1 on failure (no match found). Any other value indicates a position in the string where the match starts. PHP Code:
PHP Code:
|
Re: Problem with playing Sound + StrContains doesn't works
Okay, works. Thank you. Can you look at this sound-problem, too? :D
Thanks for StrContains. :P |
Re: Problem with playing Sound + StrContains doesn't works
Maybe your sound isn't set up right to work with half life 2? Try going to the HLSW website, and look up how to convert .wav files.
|
Re: Problem with playing Sound + StrContains doesn't works
Precache the sound during OnMapStart()
|
Re: Problem with playing Sound + StrContains doesn't works
The sound have to work for HL2, because it works at HLDJ.
It doesnt work like you said. This is what i have now: PHP Code:
|
All times are GMT -4. The time now is 18:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.