Page 1 of 1
Nu man ir vel sveikata negaluoja :D (Weapon drop)
Posted: 2011 Apr 06 23:41
by psychical
Code: Select all
#include <amxmodx>#include <amxmisc>#include <hamsandwich>#include <cstrike>#include <fakemeta_util>#include <engine>#include <fakemeta>#include <fun> #define PRIMARY_WEAPONS_BITSUM ((1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90)) public round_end(){ static players[32], inum, i get_players(players, inum, "ah") for (i = 0; i < inum; ++i) if(cs_get_user_team(players[i]) == CS_TEAM_T) { if(cs_get_user_hasprim(players[i])) { wpn_drop(players[i], PRIMARY_WEAPONS_BITSUM) fm_strip_user_weapons(players[i]) give_item(players[i], "weapon_knife") } } disabled_weapons = true} stock wpn_drop(index, wpn) { new weapons[32], num, Weapon get_user_weapons(index, weapons, num) for (new i; i < num; i++) { Weapon = weapons[i] if (wpn & (1 << Weapon)) { static wname[32] get_weaponname(Weapon, wname, sizeof(wname) - 1) ham_strip_weapon(index, wname) } } return} 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)) return 1}
nu man rodos visas kodas, kur cia beda, nes man nedropina gunu ... (ir vel kazkas blogai

)
Re: Nu man ir vel sveikata negaluoja :D (Weapon drop)
Posted: 2011 Apr 07 12:28
by newb
Noreciau suzinot kokius tu weaponus nori stripint ?
Re: Nu man ir vel sveikata negaluoja :D (Weapon drop)
Posted: 2011 Apr 07 13:47
by psychical
newb wrote:Noreciau suzinot kokius tu weaponus nori stripint ?
noriu ne stripint, o kad ismestu, o poto isstripintu, to ko neiemsete, PVZ granatu
Re: Nu man ir vel sveikata negaluoja :D (Weapon drop)
Posted: 2011 Apr 07 13:52
by newb
O tai kam ismetinet ginklus, jei juos galima bus paimt ? Ar tau reikia nustripint tik granatas ?
Re: Nu man ir vel sveikata negaluoja :D (Weapon drop)
Posted: 2011 Apr 07 15:23
by psychical
newb wrote:O tai kam ismetinet ginklus, jei juos galima bus paimt ? Ar tau reikia nustripint tik granatas ?
supranti, pas mane ismetus gun uzstato, kad ju paimti nebeimanoma yra toks dalykas, man reik kad ismestu, tada isstripintu, nes kai isstripina su pirmais wep, poto nebegali kita round'a paimti ju
Re: Nu man ir vel sveikata negaluoja :D (Weapon drop)
Posted: 2011 Apr 07 16:24
by newb
Code: Select all
#define WEAPONS_BITSUM ((1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90)|(1<<CSW_DEAGLE)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_ELITE)|(1<<CSW_P228)|(1<<CSW_FIVESEVEN)) public round_end() { new players[32], inum get_players(players, inum, "ae", "TERRORIST") for (new i, id; i < inum; i++) { id = players[i] wpn_drop(id, WEAPONS_BITSUM) strip_user_weapons(id) give_item(id, "weapon_knife") } disabled_weapons = true} stock wpn_drop(index, wpn) { new weapons[32], num, Weapon get_user_weapons(index, weapons, num) for (new i; i < num; i++) { Weapon = weapons[i] if (wpn & (1 << Weapon)) { static wname[32] get_weaponname(Weapon, wname, sizeof(wname) - 1) engclient_cmd(index, "drop", wname) } } return}
Bet seip jau geriau ta plugina pakeist, kur neduoda paimt, nei cia vietoj 1 eilutes 40 eiluciu daryt.
Re: Nu man ir vel sveikata negaluoja :D (Weapon drop)
Posted: 2011 Apr 07 20:27
by psychical
Code: Select all
L 04/07/2011 - 21:21:56: Team "TERRORIST" triggered "Terrorists_Win" (CT "3") (T "3")L 04/07/2011 - 21:21:56: World triggered "Round_End"./hlds_run: line 321: 11737 Segmentation fault (core dumped) $HL_CMD./hlds_run: line 207: gdb: command not foundemail debug.log to [email protected] Apr 7 21:21:56 EEST 2011: Server restart in 10 seconds
gali but del sito dalyko? nes iki snd kol neidejau viskas ok buvo
------------------------------------------------------
Pasirodo viskas nuo
kodel, nzn
