/* Informacje o klasie: v 1.0 - Wydanie klasy przez cypis v 1.1 - Jeśli drop'nęliśmy bazooke i ją podnieśliśmy to mieliśmy p228 a nie bazooke // Poprawka by BloodMan */ #include #include #include #include #include #define MAX 32 #define nazwa "Bazooker" #define opis "Dostaje Bazuke za pistolet P228" new const bronie = 1<0.0) UTIL_Kill(attacker, victim, fDamage, DMG_BULLET); } message_begin(MSG_BROADCAST,SVC_TEMPENTITY); write_byte(TE_EXPLOSION); write_coord(floatround(entOrigin[0])); write_coord(floatround(entOrigin[1])); write_coord(floatround(entOrigin[2])); write_short(sprite_nadeexp); write_byte(40); write_byte(30); write_byte(14); message_end(); message_begin(MSG_BROADCAST,SVC_TEMPENTITY); write_byte(TE_EXPLOSION); write_coord(floatround(entOrigin[0])); write_coord(floatround(entOrigin[1])); write_coord(floatround(entOrigin[2])); write_short(sprite_blast); write_byte(40); write_byte(30); write_byte(TE_EXPLFLAG_NONE); message_end(); message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(5) write_coord(floatround(entOrigin[0])); write_coord(floatround(entOrigin[1])); write_coord(floatround(entOrigin[2])); write_short(sprite_smoke); write_byte(35); write_byte(5); message_end(); fm_remove_entity(ent); return FMRES_IGNORED } public message_DeathMsg() { static killer, victim; killer = get_msg_arg_int(1); victim = get_msg_arg_int(2); if(wystrzelony[killer][victim]) { wystrzelony[killer][victim] = false; set_msg_arg_string(4, "grenade"); return PLUGIN_CONTINUE; } return PLUGIN_CONTINUE; } stock Float:estimate_take_hurt(Float:fPoint[3], ent) { new Float:fOrigin[3], tr, Float:fFraction; pev(ent, pev_origin, fOrigin); engfunc(EngFunc_TraceLine, fPoint, fOrigin, DONT_IGNORE_MONSTERS, 0, tr); get_tr2(tr, TR_flFraction, fFraction); if(fFraction == 1.0 || get_tr2(tr, TR_pHit) == ent) return 1.0; return 0.6; } stock UTIL_Kill(atakujacy, obrywajacy, Float:damage, damagebits) { if(get_user_health(obrywajacy) <= floatround(damage)) wystrzelony[atakujacy][obrywajacy] = true; cod_inflict_damage(atakujacy, obrywajacy, damage, 1.0, atakujacy, damagebits); }