Raised This Month: $2 Target: $400
 0% 

Why doesn't this code work?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 09-13-2006 , 19:14   Why doesn't this code work?
Reply With Quote #1

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:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_clcmd("say_team", "chatSoundTeam"); } public chatSoundTeam(id) {     new CsTeams:teamSaid = cs_get_user_team(id);     new players[32], playersDead[32];     new playerCount, i, playerCountDead, iDead;         get_players(players, playerCount, "a");     for(i=0; i<playerCount; i++) {         if(cs_get_user_team(i) == teamSaid) {             client_cmd(i, "speak sound/testing/talk.wav");         }     }         if(is_user_alive(id)) {         return PLUGIN_CONTINUE;     }     get_players(playersDead, playerCountDead, "b");     for(iDead=0; iDead<playerCountDead; iDead++) {         if(cs_get_user_team(iDead) == teamSaid) {             client_cmd(iDead, "speak sound/testing/talk.wav");         }     }         return PLUGIN_CONTINUE; }
hlstriker is offline
 


Thread Tools
Display Modes

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 23:04.


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