Why doesn't this code work?
Hi, this code is "supposed" to play a sound when say_team is used, to ONLY the team of the player that typed. I don't know why it doesn't work, and hoping some of you elite coders can help me debug it.
Code:
|
Re: Why doesn't this code work?
client_cmd(i, "speak sound/testing/talk.wav");Shouldent it be spk instead of speak? I think it should
|
Re: Why doesn't this code work?
No, that works fine, it's something to do with the cs_get_user_team or something. Not to sure : / I just know speak works hehe
|
Re: Why doesn't this code work?
Does it work when you remove
if(cs_get_user_team(i) == teamSaid) { } ? BTW, you should post the whole code (#include thepiratebaymodule) |
Re: Why doesn't this code work?
Yes
|
Re: Why doesn't this code work?
new CsTeams:teamSaid = cs_get_user_team(id);to:
new teamSaid = cs_get_user_team(id); or if(cs_get_user_team(i) == teamSaid) { to if(cs_get_user_team(i) == CsTeams:teamSaid) { does it work then? |
Re: Why doesn't this code work?
When you use get_players it stores the player id into the array. So to use it you need to do. players[i]
Code:
Same for the other get_players you used. You need to access it by using the array. Code:
|
All times are GMT -4. The time now is 17:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.