Удаление всего оружия у игрока CSGO

Alnet

Участник
Сообщения
39
Реакции
0
Всем привет. На КСС мой код прекрасно работает, но на КСГО гранаты как-бы удалилось (их взять в руки нельзя - переключиться на их) однако его видно на скине... как удалить оружие и все гранаты в CSGO так, чтоб их не было видно на скине.

PHP:
for (new slot = 0; slot < 6; slot++)
{
    new index;
    if ((index = GetPlayerWeaponSlot(client, slot)) >= 0)
    {
        if (index != -1)
        {
            DelWeaponOfIndex(client, index);
        }
    }
} 

DelWeaponOfIndex(client, index_weapon)
{
    RemovePlayerItem(client, index_weapon);
    AcceptEntityInput(index_weapon, "Kill");
}

и заодно объясните мне в чем разница между этими выражениями:

PHP:
RemoveEdict(index_weapon);

и

PHP:
RemovePlayerItem(client, index_weapon);
AcceptEntityInput(index_weapon, "Kill");
 

Alnet

Участник
Сообщения
39
Реакции
0
Не помогло, гранаты так и висят, хотя взять их нельзя (их как-будто нет)... есть еще варианты?((
 

AlmazON

Не путать с самим yand3xmail
Сообщения
5,099
Реакции
2,755
есть еще варианты?
PHP:
decl index;
for (new slot = 0; slot < 5; ++slot)
{
    while ((index = GetPlayerWeaponSlot(client, slot)) != -1)
    {
		if (slot == 3) FakeClientCommand(client, "use weapon_hegrenade");
		DelWeaponOfIndex(client, index);
    }
}

DelWeaponOfIndex(client, index_weapon)
{
    RemovePlayerItem(client, index_weapon);
    AcceptEntityInput(index_weapon, "Kill");
}
Возможно, 3 слот лучше через таймер прогонять.
Оффтоп
 
Сверху Снизу