Page 1 of 1

Atimti gun

Posted: 2010 Oct 04 23:10
by edgaras85
Kaip atimti tik VIENA ginkla?

Re: Atimti gun

Posted: 2010 Oct 04 23:15
by aaarnas
Konkretų ginklą ar visus ginklus iš tam tikro slot'o ?

Re: Atimti gun

Posted: 2010 Oct 04 23:31
by edgaras85
m4a1 kad atimtu

Re: Atimti gun

Posted: 2010 Oct 05 00:13
by aaarnas
Pamėgink:

Code: Select all

stock ham_strip_weapon(id,weapon[]){    if(!equal(weapon,"weapon_",7)) return 0;     new wId = get_weaponid(weapon);    if(!wId) return 0;     new wEnt;    while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}    if(!wEnt) return 0;     if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);     if(!ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;    ExecuteHamB(Ham_Item_Kill,wEnt);     set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));     // this block should be used for Counter-Strike:    /*if(wId == CSW_C4)    {        cs_set_user_plant(id,0,0);        cs_set_user_bpammo(id,CSW_C4,0);    }    else if(wId == CSW_SMOKEGRENADE || wId == CSW_FLASHBANG || wId == CSW_HEGRENADE)        cs_set_user_bpammo(id,wId,0);*/     return 1;}

Re: Atimti gun

Posted: 2010 Oct 06 14:29
by edgaras85
O gal gali ta pati su c4?

Re: Atimti gun

Posted: 2010 Oct 06 15:18
by aaarnas
Taigi nuimk komentarus ir rašyk ham_strip_weapon(id, "weapon_c4")

Re: Atimti gun

Posted: 2010 Oct 06 17:49
by edgaras85
Aciu tau labai :)