Problem with transfer bomb when i go die

Spedra

Пользователь
Регистрация
21 Июн 2017
Сообщения
24
Симпатии
0
Пол
Мужской
Код:
public CBasePlayer_Killed(iViti, iKiller)

{

     if(!is_user_connected(iViti) && !(get_entvar(iViti, var_weapons) & (1 << CSW_C4)) && get_playersnum()<2)

          return HC_CONTINUE


     TransferBomb(iViti);

     return HC_CONTINUE;

}


public TransferBomb(id)

{

     new bestPlayer=0;


     for(new i=1; i<33; i++)

     {

          if(is_user_alive(i) && get_member(i, m_iTeam) == TEAM_TERRORIST && i!=id)

          {

               bestPlayer = i;

          }

     }


     if(bestPlayer==0)

          return HC_CONTINUE;


     new nameBestPlayer[33], name[33];


     get_user_name(id, name, 32);

     get_user_name(bestPlayer, nameBestPlayer, 32);


     rg_transfer_c4(id, bestPlayer);

     client_print(id, print_center, "You give bomb to %s", nameBestPlayer);

     client_print(bestPlayer, print_center, "You got a bomb from %s", name)


     return HC_CONTINUE;

}
Some suggestion? ;/
 
Сверху Снизу