say_team - minor problem
Code:
public say_team(id)I wrote and CS_TEAM_CT CS_TEAM_T why not work? |
Re: say_team - minor problem
Not sure if this is why, but try making a variable before the switch and testing that variable.
Like New CsTeams:team team=cs_get_user_team(id) switch(team) //CODE HERE |
Re: say_team - minor problem
nikhilgupta345: I already put up what to select, it selects your team, but not punching the team, this is the problem ...
|
Re: say_team - minor problem
What's wrong with it, do you mean that it's showing to everyone? Not just the team?
|
Re: say_team - minor problem
chat(0, ...
That means it's sent to all players, I guess your chat() function is a copy of colorchat or something, and first arg is the player ID. So, you must do a loop and see wich player is on player's team and send'em the message. You could either use get_players() function (I understand it's buggy) or just a for() loop and check stuff. Also, create a variable to hold is_user_alive() if you use the loop... and also, you can do this: Code:
chat(0, "!team[Team] *%s* !g%s !y: !team%s", (alive ? "ALIVE" : "DEAD"), name, mes); |
Re: say_team - minor problem
Code:
public say_team(id)Expect a response from you Hunter-Digital |
Re: say_team - minor problem
No, it's not, learn to go through the code and try to simulate in your mind what it does.
Yours, apart from the verry repeatitive call of is_user_alive(), you're calling it wrong, you need to check if the sender is alive, not the receiver. Code:
public say_team(id) |
| All times are GMT -4. The time now is 00:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.