Another problem with emit_sound
I am using two different "knife" models in Freemanmod. Crowbar for the Gordons and the pipewrench for the Shephards. So obviously I need two different sounds too. So this is how I am doing it:
Code:
So anyhows the plugin for this part works exactly how I want it to work (I tested it with Potti). When the Gordon hits a wall with his crowbar, I hear the crowbar sound and when the Shephard hits the wall with his pipewrench, I hear the pipewrench sound. Still, my console gets filled with "native error" on the line with "cs_get_user_team" and it also says "player out of range." Any suggestions how to fix this / do it differently? |
Re: Another problem with emit_sound
I didn't believe it was gonna, but changing to get_user_team(id) actually worked. (I also tried the first option, but it returned with the same errors).
Thanks alot! |
Re: Another problem with emit_sound
The reason why you were getting errors is because you never added any check to the forward to make sure it's a player. The forward could have been called when some other entity made a sound. To fix this:
Code:
And get_user_team() stopped throwing errors because it doesn't throw any in the first place: Code:
|
| All times are GMT -4. The time now is 10:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.