Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSPlayers get no crosshair when changing teams


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
I have one of the match/captain plugin where two captains are selected, they duel it out, select teams and then select players. But when the players selected from the spectator, some of them lose their crosshair and have to reconnect.
Can anyone help me fix this please? Its a real nuisance to players.

LetsSecondChoosePlayers() is similar to LetsFirstChoosePlayers()
Code:

// transferring all players to spectator

 public Spec()
{
    new iPlayers[32], iPlayersNum, iPlayer
    get_players(iPlayers, iPlayersNum)
    for(new i;i < iPlayersNum;i++)
    {
        iPlayer = iPlayers[i]

        if(is_user_alive(iPlayer))
        {
            user_silentkill(iPlayer)
        }

        if(cs_get_user_team(iPlayer) < CS_TEAM_SPECTATOR)
        {
            cs_set_user_team(iPlayer, CS_TEAM_SPECTATOR)
        }
    }
}

// MENU TO CHOOSE PLAYERS FOR FIRST CAPTAIN !!!
public LetsFirstChoosePlayers(id){

    new players[32], count;
    get_players(players, count,"eh","SPECTATOR");

    if(count > 0){
        new iChoosePlayers = LetsFirstChoosePlayersMenu( id, "Choose A player.", "LetsFirstChoosePlayersHandler" );
        menu_setprop( iChoosePlayers, MPROP_NUMBER_COLOR, "\y" );
        menu_display( id, iChoosePlayers );

        return PLUGIN_HANDLED;
    }
    else{

        set_cvar_string("amx_warname","Teams Are Set!")


        set_dhudmessage(0,255, 0, -1.0, -1.0, 0, 2.0, 6.0, 0.8, 0.8)
        show_dhudmessage(0,"Teams are SET ! ^n ^n First Half will start Now.......")
        // Set Tasks
        set_task(0.1,"SetMatchCap");
        set_task(1.0,"LiveInThree");
        set_task(1.2, "SV_Restart", .flags="a", .repeat=3);
        set_task(3.0,"StartMatch");


        return PLUGIN_HANDLED;
    }
}

LetsFirstChoosePlayersMenu(id, const szMenuTitle[], const szMenuHandler[]){

    new iChoosePlayers = menu_create( szMenuTitle, szMenuHandler );
    new iPlayers[32], iNum, iPlayer, szPlayerName[32], szUserId[32];
    get_players( iPlayers, iNum, "h" );

    new PlayerWithPoints[128]

    for(new i = 0 ;i<iNum;i++){
        iPlayer = iPlayers[i];
        //Add user in the menu if - CONNECTED and TEAM IS T.
        if(get_user_team(iPlayer) == 3 ){
            get_user_name( iPlayer, szPlayerName, charsmax( szPlayerName ) );
            formatex(PlayerWithPoints,127,"%s",szPlayerName)
            formatex( szUserId, charsmax( szUserId ), "%d", get_user_userid( iPlayer ) );
            menu_additem( iChoosePlayers, PlayerWithPoints, szUserId, 0 );
        }
    }
    return iChoosePlayers;
}

public LetsFirstChoosePlayersHandler( id, iChoosePlayers, iItem ){

    if ( iItem == MENU_EXIT ){
        new iChoosePlayers = LetsFirstChoosePlayersMenu( id, "Choose A player.", "LetsFirstChoosePlayersHandler" );
        menu_setprop( iChoosePlayers, MPROP_NUMBER_COLOR, "\y" );
        menu_display( id, iChoosePlayers );

        return PLUGIN_HANDLED;
    }

    new szUserId[32], szPlayerName[32], iPlayer,  iCallback;
    menu_item_getinfo( iChoosePlayers, iItem, iCallback, szUserId, charsmax( szUserId ), szPlayerName, charsmax( szPlayerName ), iCallback );

    if ( ( iPlayer = find_player( "k", str_to_num( szUserId ) ) )  ){
        new ChoosenPlayer[32]
        get_user_name(iPlayer, ChoosenPlayer, charsmax(ChoosenPlayer))
        CromChat(0,"  &x04Captain &x03%s &x04chose &x01Player &x04%s ",g_Captain1,ChoosenPlayer);

        if(!is_user_connected(iPlayer)){
            new iChoosePlayers = LetsFirstChoosePlayersMenu( id, "Choose A player.", "LetsFirstChoosePlayersHandler" );
            menu_setprop( iChoosePlayers, MPROP_NUMBER_COLOR, "\y" );
            menu_display( id, iChoosePlayers );

            return PLUGIN_HANDLED;
        }
        else{
            CaptainChoosenID = id
            WhoChoseThePlayer = 1
            cs_set_user_team(iPlayer, cs_get_user_team(id))
            LetsSecondChoosePlayers(ShowMenuSecond)
            return PLUGIN_HANDLED;
        }
    }
    return PLUGIN_HANDLED;
}

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...