Jump to content
GIGN Forum

Knife Disabler


Recommended Posts

mapes, konkrētās mapēs nevis serverī

Nu tad atklajas ka nav jamaina nekadi servera faili, bet ir vajadziga ta funkcija(iespejams scripts) kurs disablo to knife..jo sad tad gadas ka nogluko, serveros kur vis ir normali nav nekas tads speciali taisits, ka vnk pleijers skrien ar atplestam rokam.

Lab, skaidrs te tad atbildi neatradisu.

Edited by CJxx
Link to comment
Share on other sites

 stock ham_strip_weapon(id,weapon[])
{  
    if(!equal(weapon,"weapon_",7)) return 0;

    new wId = get_weaponid(weapon);
    if(!wId) return 0;

    new wEnt = fm_find_ent_by_owner(1,weapon,id);
    if(!wEnt) return 0;
    
    new dummy, weapon = get_user_weapon(id,dummy,dummy);
    if(weapon == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
    
    if(!ExecuteHamB(Ham_RemovePlayerItem,id,any:wEnt)) return 0;
    ExecuteHamB(Ham_Item_Kill,wEnt);

    set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));
    return 1;
}

if(user_has_weapon(id, CSW_KNIFE))
{
    ham_strip_weapon(id, "weapon_knife");
}

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...