View Single Post
nkSid
New Member
Join Date: Feb 2016
Old 01-15-2017 , 05:03   Re: Auto-Mix (Pug) - By: p1Mp
Reply With Quote #871

Quote:
Originally Posted by iNdio View Post
  1. Entire plugin was colored.
  2. Added respawn on warm.
  3. Solved Spectator: Till the Random Captain will be chosen, „Players are always in game and sometimes they can't move”.
  4. Solved Votemap: When votemap ends plugin shows the good one voted & other 2 messages appear, then server change map to other. (non-voted).
  5. Before using this plugin, change the cvars in configs/amxx.cfg below!
  6. 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"PREFIXLANG_PLAYER,"SPEC_NON");
            return 
PLUGIN_HANDLED;
        }
        
        if(
cs_get_user_team(id) == CS_TEAM_SPECTATOR) {
            if(
TerroristTeam[id] == true) {
                
cs_set_user_team(idCS_TEAM_T);
                
chat_color id"!g%s %L"PREFIXLANG_PLAYER,"SPEC_TT");
                return 
PLUGIN_HANDLED;
            }
            else {
                
cs_set_user_team(idCS_TEAM_CT);
                
chat_color id"!g%s %L"PREFIXLANG_PLAYER,"SPEC_CT");
                return 
PLUGIN_HANDLED;
            }
            
ExecuteHam(Ham_CS_RoundRespawnid); 
            
cs_set_user_deaths(id0);
        }
    }
    return 
PLUGIN_HANDLED;

When this part is executed?
PHP Code:
            ExecuteHam(Ham_CS_RoundRespawnid); 
            
cs_set_user_deaths(id0); 
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?
nkSid is offline