AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   remove incorrect player :/ (https://forums.alliedmods.net/showthread.php?t=120867)

liryck 03-08-2010 19:10

remove incorrect player :/
 
im trying to remove the player that was selected by ctcap but what i got is remove the player that wasn't selected.
and when i display the menu to Tcap the player that was selected for the ctcap appear in the option for the tcap

PHP Code:

if(swap == false && is_user_connected(ptempid)){
        
cs_set_user_team(ptempidCS_TEAM_CT)
        
get_user_name(ptempid,name,31)
        
client_print(0,print_chat,"%s Has Sido Elegido Por el Capitan de los CT's",name)
        
selectedct[count++]= iPlayers[ptempid]
        
iPlayers[ptempid]= iPlayers[--iNum]
        
ct_team++
        
swap true;
        if(
count == ct_team && ct_team <= 4)
            {
                
menu_destroy(menu);
                
AwesomeMenu(t_cap)
                return 
PLUGIN_HANDLED;
            }
    }
    }
    if(
swap == true && is_user_connected(ptempid)){
        
cs_set_user_team(ptempid,CS_TEAM_T)
    
get_user_name(ptempid,name,31)
    
iPlayers[ptempid]=iPlayers[--iNum]
    
swap false;
    
menu_destroy(menu);
            
AwesomeMenu(ct_cap)
    return 
PLUGIN_HANDLED;

    } 



All times are GMT -4. The time now is 08:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.