Quote:
Originally Posted by iNdio
- Entire plugin was colored.
- Added respawn on warm.
- Solved Spectator: Till the Random Captain will be chosen, „Players are always in game and sometimes they can't move”.
- Solved Votemap: When votemap ends plugin shows the good one voted & other 2 messages appear, then server change map to other. (non-voted).
- Before using this plugin, change the cvars in configs/amxx.cfg below!
- Only 1 unsolved thing, „Plugin called menu_display when item=MENU_EXIT”!
Everything works fine even with this error, you'll get a lot of error lines but no crash, I can solve this but will not work properly the votemap again.
So here is the last version till I solve "menu_exit", maybe never.
|
main code
PHP Code:
public cmdBack(id)
{
if(is_user_admin(id)) {
if(cs_get_user_team(id) != CS_TEAM_SPECTATOR) {
chat_color ( id, "!g%s %L", PREFIX, LANG_PLAYER,"SPEC_NON");
return PLUGIN_HANDLED;
}
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) {
if(TerroristTeam[id] == true) {
cs_set_user_team(id, CS_TEAM_T);
chat_color ( id, "!g%s %L", PREFIX, LANG_PLAYER,"SPEC_TT");
return PLUGIN_HANDLED;
}
else {
cs_set_user_team(id, CS_TEAM_CT);
chat_color ( id, "!g%s %L", PREFIX, LANG_PLAYER,"SPEC_CT");
return PLUGIN_HANDLED;
}
ExecuteHam(Ham_CS_RoundRespawn, id);
cs_set_user_deaths(id, 0);
}
}
return PLUGIN_HANDLED;
}
When this part is executed?
PHP Code:
ExecuteHam(Ham_CS_RoundRespawn, id);
cs_set_user_deaths(id, 0);
I mean in if else statement you gave condition and we are using 'return ' function in both if and else statement so what this code does?