BoJlog9l | Дата: Вторник, 17.12.2013, 18:08 | Сообщение # 1 |
- Сообщения: 45
- Награды: 0
- Замечания:
|
Всем привет! Мне снова нужна ваша помощь. Помогите переписать плагин VIP в нем дается топор(за место ножа) с 2ым дамагом, дигл, гранаты и броня.(возможно щипцы ct) Мне нужен только топор и двойной дамаг, а все остальное убрать. http://rghost.ru/51024882Добавлено (17.12.2013, 18:08) --------------------------------------------- Хотя все, не надо делать, можете удалить тему.Извиняйте за флуд.
|
|
| |
Serega_o460sa | Дата: Вторник, 17.12.2013, 18:42 | Сообщение # 2 |
- Сообщения: 65
- Награды: 0
- Замечания:
|
Попробуй
Код /* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <engine> #include <fakemeta> #include <hamsandwich> #define PLUGIN "[fun.inc] give_item" #define VERSION "1.0" #define AUTHOR "Admin / DooMka"
new cvar_topor_dmg
new vModel[64] = "models/v_doomka_topor.mdl" new pModel[64] = "models/p_doomka_topor.mdl"
new const oldknife_sounds[][] = { "weapons/knife_deploy1.wav", "weapons/knife_hit1.wav", "weapons/knife_hit2.wav", "weapons/knife_hit3.wav", "weapons/knife_hit4.wav", "weapons/knife_hitwall1.wav", "weapons/knife_slash1.wav", "weapons/knife_slash2.wav", "weapons/knife_stab.wav" }
new const knife_sounds[][] = { "zombie_plague/Nemesis/knife_deploy1.wav", "zombie_plague/Nemesis/knife_hit1.wav", "zombie_plague/Nemesis/knife_hit2.wav", "zombie_plague/Nemesis/knife_hit3.wav", "zombie_plague/Nemesis/knife_hit4.wav", "zombie_plague/Nemesis/knife_hitwall1.wav", "zombie_plague/Nemesis/knife_slash1.wav", "zombie_plague/Nemesis/knife_slash2.wav", "zombie_plague/Nemesis/knife_stab.wav" }
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam(Ham_Spawn, "player", "vipspawn", 1) register_forward(FM_EmitSound, "fw_EmitSound") RegisterHam(Ham_Item_Deploy, "weapon_knife", "Ham_Item_Deploy_Post", 1) RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage") cvar_topor_dmg = register_cvar("zp_axdgf_dmg", "2.0") register_event("ResetHUD", "resetModel", "b") } public vipspawn(id){ if(is_user_alive(id)) { if (get_user_flags(id) & ADMIN_LEVEL_H) { //give_item(id,"weapon_awp") cs_set_user_armor(id,100,CS_ARMOR_VESTHELM) cs_set_user_bpammo( id, CSW_DEAGLE, 35); } } }
public plugin_precache() { precache_model(vModel) precache_model(pModel)
for(new i = 0; i < sizeof knife_sounds; i++) precache_sound(knife_sounds[i]) return PLUGIN_CONTINUE }
public fw_EmitSound(id, channel, const sound[]) {
if(get_user_weapon(id) != CSW_KNIFE) return FMRES_IGNORED if(get_user_flags(id) & ADMIN_LEVEL_H) { for(new i = 0; i < sizeof knife_sounds; i++) { if(equal(sound, oldknife_sounds[i])) { emit_sound(id, channel, knife_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } return FMRES_IGNORED }
public Ham_Item_Deploy_Post(weapon_ent) { static id; id = get_pdata_cbase(weapon_ent, 41, 4) if (get_user_flags(id) & ADMIN_LEVEL_H) { set_pev(id, pev_viewmodel2, vModel) set_pev(id, pev_weaponmodel2, pModel) } }
public fw_TakeDamage(victim, inflictor, attacker, Float:damage) { if (victim != attacker && is_user_connected(attacker)) { if(get_user_flags(attacker) & ADMIN_LEVEL_H) { if(get_user_weapon(attacker) == CSW_KNIFE) { SetHamParamFloat(4, damage * get_pcvar_float(cvar_topor_dmg)) new dmggv = read_data(2) client_print(attacker,print_center,"- %d",dmggv) } } } }
|
|
| |