Weapon Special Abilities

Всичко свързано с AMX mod (X), плъгини, проблеми с плъгини, заявки и тн.
Потребителски аватар
TheRedShoko
Member
Мнения: 50
Регистриран: пет мар 25, 2016 2:54 pm
Баланс: Locked

нед апр 17, 2016 10:48 pm

Име на плъгина: Weapon Special Abilities
Автор: TheRedShoko
Версия: 1.1

Описание: Плъгинът добавя в играта ви ново меню, чрез което можете да изберете специална способност за вашото оръжие. Нещо подобно на плъгина Knife mod - Special Abilities, но тук може, чрез cvar, да се избира, за кое оръжие да се ползва плъгина, може да добавя моделите на оръжията, името им в менюто и способността им чрез .ini файл.

Команди:
say /weapon | say /weapons | say /abilities | say_team /weapon | say_team /weapons | say_team /abilities - Отваря менюто

Cvars:
ability_weapon - За кое оръжие да бъде менюто. По подразбиране - "29" (нож)

Код: Трябва да си влязъл в системата, за да можеш да виждаш линковете

Списък с номерата на оръжията:
 1  P228
 2  Няма       
 3  Scout         
 4  HeGrenade         
 5  XM1014
 6  C4       
 7  Mac10    
 8  AUG
 9  SmokeGrenade             
10 Elites          
11 FiveSeven
12 UMP45             
13 SG550
14 Galil
15 Famas    
16 USP    
17 Glock18
18 AWP
19 MP5Navy    
20 M249           
21 M3
22 M4A1             
23 TMP  
24 G3SG1
25 Flashbang           
26 Deagle
27 SG552  
28 AK47 
29 Knife          
30 P90 
weapon_ability_damage - Колко пъти повече щета да нанасят моделите притежаващи флаг "a". По подразбиране - "2.0"
weapon_ability_gravity - Колко гравитация да имат моделите притежаващи флаг "b" според cvar-a sv_gravity. По подразбиране "500"
weapon_ability_speed - Колко да бъде скоростта на моделите притежаващи флаг "c". Нормалната скорост е 270 По подразбиране "340"
weapon_ability_invisibility - Колко % да бъде невидим играча, ако модела на неговото оръжие има флаг "d". По подразбиране "60"
weapon_ability_regen - По колко кръв да се регенерира играч, когато модела му има флаг "f". По подразбиране "5"
weapon_ability_regen_time - През колко време да се регенерира играча. По подразбиране "5.0"
weapon_ability_regen_maxhp - Максималната кръв, която играч може да предобие, чрез регенериране. По подразбиране "150"
weapon_ability_fire_duration - Продължителността на горенето в секунди. По подразбиране "10"
weapon_ability_fire_hurt - По колко щета да прави на всяка секунда, когато си запален. По подразбиране "10"
weapon_ability_freeze_time - Продължителността на замразяване в секунди. По подразбиране "10"

Код: Трябва да си влязъл в системата, за да можеш да виждаш линковете

Change log:

v1.0 - first release
v1.1 - added Burn (flag "g") & Freeze (flag "h") Abilities
Инсталация на плъгина:
1. Поставяте папките от архива в cstrike папката на вашия сървър.
2. В plugins.ini вписвате weapon_abilities.amxx.
3. Стартирате сървъра си и поглеждате в папката configs на вашият сървър.
4. Намирате файла weapon_list.ini, който се намира в папката configs на сървъра ви. Като го отворите би трябвало да изглежда така:

Код: Трябва да си влязъл в системата, за да можеш да виждаш линковете

; Weapon Abilities by TheRedShoko
; Flags:
; a - Higher damage
; b - Lower Gravity
; c - Higher Speed
; d - Less Visibiliry
; e - No footsteps
; f - Health Regen
; g - Burn Players
; h - Freeze Players
; "Weapon Name to be displayed" "Flags" "v_model path" "p_model path"
За да добавите нов скин на оръжие на нов ред във файла добавяте:

Код: Трябва да си влязъл в системата, за да можеш да виждаш линковете

"Име на оръжието" "Способности, които оръжието ще има ( може да ги видите от горните редове )" "път към v_ модела на оръжието" "път към p_ модела на оръжието"
Ако нямате p_ модел просто запишете модела, който е по подразбиране и готово.

Снимки:
Изображение

Изображение

Изображение

Изображение

Изображение

Изображение

Изображение

Трябва да си влязъл в системата, за да можеш да виждаш линковете

П.С. Вярвам, че не успях да обясня добре как се инсталира и как работи плъгина, затова ако някой има въпроси нека пита в темата.
Прикачени файлове
Трябва да си влязъл в системата, за да можеш да виждаш линковете

Потребителски аватар
Irie
Newbie
Мнения: 16
Регистриран: съб юни 25, 2016 11:31 am
Баланс: Locked

пон авг 22, 2016 11:23 am

Плъгина е хубав, само че има 1 проблем, когато натисна на някой нож, сървъра крашва. Защо?
И btw, как да го направя, така че само CT отбора да може да ползва менюто? :D
Също така, както има в другия ти плъгин, може ли и в този да се добави примерно някой knife със определен флаг?

Потребителски аватар
TheRedShoko
Member
Мнения: 50
Регистриран: пет мар 25, 2016 2:54 pm
Баланс: Locked

пон авг 22, 2016 11:31 am

Грешки? Списък с плъгините ти? Не съм имал проблем с крашове о.0 Ще добавя при следващия ъпдейт на плъгина опция за админ флаг във файла и ще добавя квар от кой отбор да може да се използва :)

Потребителски аватар
Irie
Newbie
Мнения: 16
Регистриран: съб юни 25, 2016 11:31 am
Баланс: Locked

пон авг 22, 2016 12:38 pm

Plugins:
team_join.amxx
admenu.amxx
admin_money.amxx
bbhp.amxx
bb_shop.amxx
vmenu.amxx
ad_manager.amxx
models_menu.amxx
weapon_abilities.amxx

Errors:
08/22/2016 - 11:54:41: -------- Mapchange to bb_ultrabuild4 --------
L 08/22/2016 - 11:54:41: [weapon_abilities.amxx] Failed to precache: "Abilities"! It's missing or may have a wrong name!
L 08/22/2016 - 11:54:41: [weapon_abilities.amxx] Failed to precache: "by"! It's missing or may have a wrong name!
L 08/22/2016 - 11:54:41: [weapon_abilities.amxx] Failed to precache: "v_skullaxe"! It's missing or may have a wrong name!
L 08/22/2016 - 11:54:41: [weapon_abilities.amxx] Failed to precache: "p_skullaxe"! It's missing or may have a wrong name!

Менюто си го отваря, изписва името на модела, като натисна на него, сървъра крашва...

Потребителски аватар
TheRedShoko
Member
Мнения: 50
Регистриран: пет мар 25, 2016 2:54 pm
Баланс: Locked

пон авг 22, 2016 2:46 pm

Дай ми съдържанието на .ini файла.

Потребителски аватар
Irie
Newbie
Мнения: 16
Регистриран: съб юни 25, 2016 11:31 am
Баланс: Locked

пон авг 22, 2016 8:49 pm

; Weapon Abilities by TheRedShoko
; Flags:
; a - Higher damage
; b - Lower Gravity
; c - Higher Speed
; d - Less Visibiliry
; e - No footsteps
; f - Health Regen
; "Weapon Name to be displayed" "Flags" "v_model path" "p_model path"

;"Име на оръжието" "Способности, които оръжието ще има ( може да ги видите от горните редове )" "път към v_ модела на оръжието" "път към p_ модела на оръжието"

"TEST" "a" "v_banhammer" "p_banhammer"

Потребителски аватар
TheRedShoko
Member
Мнения: 50
Регистриран: пет мар 25, 2016 2:54 pm
Баланс: Locked

вт авг 23, 2016 12:42 am

Пътя към модела трябва да е пълен, тоест v_banhammer => models/v_banhammer.mdl

Потребителски аватар
Irie
Newbie
Мнения: 16
Регистриран: съб юни 25, 2016 11:31 am
Баланс: Locked

съб авг 27, 2016 1:02 pm

[quote="TheRedShoko"]Пътя към модела трябва да е пълен, тоест v_banhammer => models/v_banhammer.mdl[/quote]


Благодаря, стана! Плъгина го ползвам за BaseBuilder сървър, как да го направя да е само за CT отбора? Защото и зомбитата имат достъп до /weapons? :D

Потребителски аватар
TheRedShoko
Member
Мнения: 50
Регистриран: пет мар 25, 2016 2:54 pm
Баланс: Locked

пон авг 29, 2016 7:31 pm

Код: Трябва да си влязъл в системата, за да можеш да виждаш линковете

<span class="syntaxdefault"></span><span class="syntaxcomment">#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <fun>

#define VERSION "1.1"
#define TASK_REGEN 123
#define TASK_BURN 156
#define TASK_FREEZE 188

</span><span class="syntaxdefault">enum Cvars
</span><span class="syntaxkeyword">{
    </span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">MULT_DMG</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">GRAVITY</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">SPEED</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">VISIBILITY</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">REGEN</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">REGEN_TIME</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">REGEN_MAX</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">FIRE_DURATION</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">FIRE_HURT</span><span class="syntaxkeyword">,
    </span><span class="syntaxdefault">FREEZE_TIME
</span><span class="syntaxkeyword">}

new </span><span class="syntaxdefault">szWeaponCommands</span><span class="syntaxkeyword">[][] =
{
    </span><span class="syntaxstring">"say /weapon"</span><span class="syntaxkeyword">,
    </span><span class="syntaxstring">"say /weapons"</span><span class="syntaxkeyword">,
    </span><span class="syntaxstring">"say /abilities"</span><span class="syntaxkeyword">,
    </span><span class="syntaxstring">"say_team /weapon"</span><span class="syntaxkeyword">,
    </span><span class="syntaxstring">"say_team /weapons"</span><span class="syntaxkeyword">,
    </span><span class="syntaxstring">"say_team /abilities"
</span><span class="syntaxkeyword">}

new Array:</span><span class="syntaxdefault">WeaponNames</span><span class="syntaxkeyword">, Array:</span><span class="syntaxdefault">WeaponAbbilities</span><span class="syntaxkeyword">, Array:</span><span class="syntaxdefault">WeaponViewModels</span><span class="syntaxkeyword">, Array:</span><span class="syntaxdefault">WeaponWorldModels
</span><span class="syntaxkeyword">new </span><span class="syntaxdefault">iTotalWeapons</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">Cvars</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">iCurrentWeapon</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">33</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">iUserFireAttacker</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">33</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">iUserFireDuration</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">33</span><span class="syntaxkeyword">]
new </span><span class="syntaxdefault">iMsgStatusIcon</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iSprFlame</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iSprSmoke</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iGlassGibs

</span><span class="syntaxkeyword">new </span><span class="syntaxdefault">szIceModel</span><span class="syntaxkeyword">[] = </span><span class="syntaxstring">"models/wsa/ice_cube.mdl"
</span><span class="syntaxkeyword">new </span><span class="syntaxdefault">szIceBlockClassname</span><span class="syntaxkeyword">[] = </span><span class="syntaxstring">"entity_ice_block"

</span><span class="syntaxkeyword">public </span><span class="syntaxdefault">plugin_init</span><span class="syntaxkeyword">()
{
    </span><span class="syntaxdefault">register_plugin</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"Weapon Special Abilities"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">VERSION</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"TheRedShoko"</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_abilities_version"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">VERSION</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">FCVAR_SERVER </span><span class="syntaxkeyword">| </span><span class="syntaxdefault">FCVAR_SPONLY</span><span class="syntaxkeyword">)
    
    </span><span class="syntaxdefault">register_event</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"CurWeapon"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"eventCurrentWeapon"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"be"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"1=1"</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">RegisterHam</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Ham_TakeDamage</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"player"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"playerTakeDamagePre"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">0</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">RegisterHam</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Ham_TakeDamage</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"player"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"playerTakeDamagePost"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">1</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">RegisterHam</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Ham_TraceAttack</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"player"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"playerAttackPre"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">0</span><span class="syntaxkeyword">)
    
    for (new </span><span class="syntaxdefault">i </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">0</span><span class="syntaxkeyword">; </span><span class="syntaxdefault">i </span><span class="syntaxkeyword">< </span><span class="syntaxdefault">sizeof</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szWeaponCommands</span><span class="syntaxkeyword">); </span><span class="syntaxdefault">i</span><span class="syntaxkeyword">++)
    {
        </span><span class="syntaxdefault">register_clcmd</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szWeaponCommands</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">i</span><span class="syntaxkeyword">], </span><span class="syntaxstring">"weapon_ability_menu"</span><span class="syntaxkeyword">)
    }
    
    </span><span class="syntaxdefault">iMsgStatusIcon </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">get_user_msgid</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"StatusIcon"</span><span class="syntaxkeyword">)
    
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"ability_weapon"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"29"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// The index of the weapon! Default: 29 - knife
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">MULT_DMG</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_damage"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"2.0"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// How many times the damage will be higher for weapons with flag "a"! Default: 2.0
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">GRAVITY</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_gravity"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"500"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// The amount of gravity for weapons with flag "b" using sv_gravity cvar! Default: 500
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">SPEED</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_speed"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"340"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// The amount of speed for weapons with flag "c"! Default: 340
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">VISIBILITY</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_invisibility"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"60"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">//The amount in % of visibility for weapons with flag "d"! Default: 60
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">REGEN</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_regen"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"5"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// The amount of health that will be regenerated for weapons with flag "f"! Default: 5
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">REGEN_TIME</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_regen_time"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"5.0"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// The delay between every health delay in float! Default: 5.0
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">REGEN_MAX</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_regen_maxhp"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"150"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// The max amount of health that user can regen! Default: 150
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">FIRE_DURATION</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_fire_duration"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"10"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// The duration of the fire when user is burned. Default: 10
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">FIRE_HURT</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_fire_hurt"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"10"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">// The amount of health that will be taken while burning. Default: 10
    </span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">FREEZE_TIME</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"weapon_ability_freeze_time"</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"10"</span><span class="syntaxkeyword">) </span><span class="syntaxcomment">//The frost duration. Defautl: 10
</span><span class="syntaxkeyword">}

public </span><span class="syntaxdefault">plugin_precache</span><span class="syntaxkeyword">()
{
    </span><span class="syntaxdefault">WeaponNames </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">ArrayCreate</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">32</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">1</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">WeaponAbbilities </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">ArrayCreate</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">16</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">1</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">WeaponViewModels </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">ArrayCreate</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">64</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">1</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">WeaponWorldModels </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">ArrayCreate</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">64</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">1</span><span class="syntaxkeyword">)
    
    </span><span class="syntaxdefault">Load_File</span><span class="syntaxkeyword">()
    
    new </span><span class="syntaxdefault">szModel</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">128</span><span class="syntaxkeyword">]
    
    for (new </span><span class="syntaxdefault">i </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">1</span><span class="syntaxkeyword">; </span><span class="syntaxdefault">i </span><span class="syntaxkeyword">< </span><span class="syntaxdefault">iTotalWeapons</span><span class="syntaxkeyword">; </span><span class="syntaxdefault">i</span><span class="syntaxkeyword">++)
    {
        </span><span class="syntaxdefault">ArrayGetString</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">WeaponViewModels</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">i</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">szModel</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">charsmax</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szModel</span><span class="syntaxkeyword">))
        
        </span><span class="syntaxdefault">PrecacheModel</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szModel</span><span class="syntaxkeyword">)
        
        </span><span class="syntaxdefault">ArrayGetString</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">WeaponWorldModels</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">i</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">szModel</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">charsmax</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szModel</span><span class="syntaxkeyword">))
        
        </span><span class="syntaxdefault">PrecacheModel</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szModel</span><span class="syntaxkeyword">)
    }
    
    </span><span class="syntaxdefault">PrecacheModel</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szIceModel</span><span class="syntaxkeyword">)
    
    </span><span class="syntaxdefault">iSprFlame </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">precache_model</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"sprites/flame.spr"</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">iSprSmoke </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">precache_model</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"sprites/black_smoke1.spr"</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">iGlassGibs </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">precache_model</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"models/glassgibs.mdl"</span><span class="syntaxkeyword">)
}

public </span><span class="syntaxdefault">client_connect</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
{
    </span><span class="syntaxdefault">reset</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
}

public </span><span class="syntaxdefault">client_disconnect</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
{
    </span><span class="syntaxdefault">reset</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
}

</span><span class="syntaxdefault">reset</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
{
    if (</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_REGEN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">remove_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_REGEN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
    }
    
    if (</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_FREEZE </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">remove_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_FREEZE </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
        </span><span class="syntaxdefault">user_unfreeze</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_FREEZE </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
    }
    
    if (</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_BURN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">remove_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_BURN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
    }
    
    </span><span class="syntaxdefault">iCurrentWeapon</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">0
</span><span class="syntaxkeyword">}

public </span><span class="syntaxdefault">playerAttackPre</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">Float</span><span class="syntaxkeyword">:</span><span class="syntaxdefault">flDamage</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">Float</span><span class="syntaxkeyword">:</span><span class="syntaxdefault">flDirection</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">3</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">tracehandle</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">damage_type</span><span class="syntaxkeyword">)
{
    if (!</span><span class="syntaxdefault">is_user_connected</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) || </span><span class="syntaxdefault">iVictim </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">iAttacker </span><span class="syntaxkeyword">|| </span><span class="syntaxdefault">get_user_team</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) != </span><span class="syntaxdefault">2</span><span class="syntaxkeyword">)
    {
        return </span><span class="syntaxdefault">HAM_IGNORED
    </span><span class="syntaxkeyword">}
    
    new </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">8</span><span class="syntaxkeyword">]
    </span><span class="syntaxdefault">ArrayGetString</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">WeaponAbbilities</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iCurrentWeapon</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">charsmax</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">))
    
    if (</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_FREEZE </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">))
    {
        if (</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"g"</span><span class="syntaxkeyword">) && </span><span class="syntaxdefault">get_user_weapon</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) != </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">])
        || !</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"g"</span><span class="syntaxkeyword">))
        {
            return </span><span class="syntaxdefault">HAM_SUPERCEDE
        </span><span class="syntaxkeyword">}
    }
    
    return </span><span class="syntaxdefault">HAM_IGNORED
</span><span class="syntaxkeyword">}

public </span><span class="syntaxdefault">playerTakeDamagePre</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">Inflictor</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">Float</span><span class="syntaxkeyword">:</span><span class="syntaxdefault">flDamage</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iDmgBits</span><span class="syntaxkeyword">)
{
    if (</span><span class="syntaxdefault">iAttacker </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">iVictim </span><span class="syntaxkeyword">|| !</span><span class="syntaxdefault">is_user_connected</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) 
    || </span><span class="syntaxdefault">get_user_weapon</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) != </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">])
    || </span><span class="syntaxdefault">get_user_team</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) == </span><span class="syntaxdefault">get_user_team</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">) || </span><span class="syntaxdefault">get_user_team</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) != </span><span class="syntaxdefault">2</span><span class="syntaxkeyword">)
    {
        return </span><span class="syntaxdefault">HAM_IGNORED
    </span><span class="syntaxkeyword">}
    
    new </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">8</span><span class="syntaxkeyword">]
    </span><span class="syntaxdefault">ArrayGetString</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">WeaponAbbilities</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iCurrentWeapon</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">charsmax</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">))
    
    if (</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"a"</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">SetHamParamFloat</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">4</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">flDamage </span><span class="syntaxkeyword">* </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">MULT_DMG</span><span class="syntaxkeyword">]))
    }
    
    if (</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"h"</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">set_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">0.1</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"user_freeze"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iVictim </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">TASK_FREEZE</span><span class="syntaxkeyword">)
    }
    
    return </span><span class="syntaxdefault">HAM_IGNORED
</span><span class="syntaxkeyword">}

public </span><span class="syntaxdefault">playerTakeDamagePost</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">Inflictor</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">Float</span><span class="syntaxkeyword">:</span><span class="syntaxdefault">flDamage</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iDmgBits</span><span class="syntaxkeyword">)
{
    if (</span><span class="syntaxdefault">iAttacker </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">iVictim </span><span class="syntaxkeyword">|| !</span><span class="syntaxdefault">is_user_connected</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) || !</span><span class="syntaxdefault">is_user_alive</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">)
    || </span><span class="syntaxdefault">get_user_weapon</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) != </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">])
    || </span><span class="syntaxdefault">get_user_team</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) == </span><span class="syntaxdefault">get_user_team</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">) || </span><span class="syntaxdefault">get_user_team</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">) != </span><span class="syntaxdefault">2</span><span class="syntaxkeyword">)
    {
        return </span><span class="syntaxdefault">HAM_IGNORED
    </span><span class="syntaxkeyword">}
    
    new </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">8</span><span class="syntaxkeyword">]
    </span><span class="syntaxdefault">ArrayGetString</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">WeaponAbbilities</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iCurrentWeapon</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">iAttacker</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">charsmax</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">))
    
    if (</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"g"</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">iUserFireAttacker</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">iAttacker
        iUserFireDuration</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">FIRE_DURATION</span><span class="syntaxkeyword">])
        
        </span><span class="syntaxdefault">set_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">0.1</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"start_burn"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">TASK_BURN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">iVictim</span><span class="syntaxkeyword">)
    }
    
    return </span><span class="syntaxdefault">HAM_IGNORED
</span><span class="syntaxkeyword">}

public </span><span class="syntaxdefault">eventCurrentWeapon</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
{
    new </span><span class="syntaxdefault">iWeapon </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">read_data</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">)
    
    if (</span><span class="syntaxdefault">iWeapon </span><span class="syntaxkeyword">!= </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">]) || </span><span class="syntaxdefault">get_user_team</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">) != </span><span class="syntaxdefault">2</span><span class="syntaxkeyword">)
    {
        return;
    }
    
    </span><span class="syntaxdefault">SetWeapon</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
    
    new </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">8</span><span class="syntaxkeyword">]
    </span><span class="syntaxdefault">ArrayGetString</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">WeaponAbbilities</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iCurrentWeapon</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">charsmax</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">))
    
    </span><span class="syntaxdefault">set_pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_gravity</span><span class="syntaxkeyword">, ((</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"b"</span><span class="syntaxkeyword">) && </span><span class="syntaxdefault">iWeapon </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">])) ? </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">GRAVITY</span><span class="syntaxkeyword">]) : </span><span class="syntaxdefault">800.0 </span><span class="syntaxkeyword">) / </span><span class="syntaxdefault">800.0</span><span class="syntaxkeyword">)
    
    </span><span class="syntaxdefault">set_pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_maxspeed</span><span class="syntaxkeyword">, (</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"c"</span><span class="syntaxkeyword">) && </span><span class="syntaxdefault">iWeapon </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">])) ? </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">SPEED</span><span class="syntaxkeyword">]) : </span><span class="syntaxdefault">270.0</span><span class="syntaxkeyword">)
    
    </span><span class="syntaxdefault">set_user_footsteps</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, ((</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"e"</span><span class="syntaxkeyword">) && </span><span class="syntaxdefault">iWeapon </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">])) ? </span><span class="syntaxdefault">1 </span><span class="syntaxkeyword">: </span><span class="syntaxdefault">0</span><span class="syntaxkeyword">))
    
    if (</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"f"</span><span class="syntaxkeyword">) && !</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_REGEN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">) && </span><span class="syntaxdefault">iWeapon </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">]))
    {
        </span><span class="syntaxdefault">set_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">REGEN_TIME</span><span class="syntaxkeyword">]), </span><span class="syntaxstring">"user_regen"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">TASK_REGEN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, .</span><span class="syntaxdefault">flags </span><span class="syntaxkeyword">= </span><span class="syntaxstring">"b"</span><span class="syntaxkeyword">)
    }
    else if (</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_REGEN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">remove_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_REGEN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
    }
    
    </span><span class="syntaxdefault">fm_set_rendering</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">kRenderFxNone</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">0</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">0</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">0</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">kRenderTransAlpha</span><span class="syntaxkeyword">, (</span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"d"</span><span class="syntaxkeyword">) && </span><span class="syntaxdefault">iWeapon </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">])) ? (</span><span class="syntaxdefault">255 </span><span class="syntaxkeyword">- (</span><span class="syntaxdefault">2.55 </span><span class="syntaxkeyword">* </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">VISIBILITY</span><span class="syntaxkeyword">]))) : </span><span class="syntaxdefault">255.0</span><span class="syntaxkeyword">)
}

public </span><span class="syntaxdefault">user_regen</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">taskid</span><span class="syntaxkeyword">)
{
    new </span><span class="syntaxdefault">id </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">taskid </span><span class="syntaxkeyword">- </span><span class="syntaxdefault">TASK_REGEN
    </span><span class="syntaxkeyword">new </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">8</span><span class="syntaxkeyword">]
    </span><span class="syntaxdefault">ArrayGetString</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">WeaponAbbilities</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iCurrentWeapon</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">charsmax</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">))
    
    if (</span><span class="syntaxdefault">pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_health</span><span class="syntaxkeyword">) < </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">REGEN_MAX</span><span class="syntaxkeyword">]) && </span><span class="syntaxdefault">has_ability</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">szFlags</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"f"</span><span class="syntaxkeyword">)
    && </span><span class="syntaxdefault">get_user_weapon</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">) == </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">WEAPON_WHICH</span><span class="syntaxkeyword">]))
    {
        </span><span class="syntaxdefault">set_pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_health</span><span class="syntaxkeyword">, ((</span><span class="syntaxdefault">pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_health</span><span class="syntaxkeyword">) + </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">REGEN</span><span class="syntaxkeyword">])) < </span><span class="syntaxdefault">get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">REGEN_MAX</span><span class="syntaxkeyword">])) ? (</span><span class="syntaxdefault">pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_health</span><span class="syntaxkeyword">) + </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">REGEN</span><span class="syntaxkeyword">])) : </span><span class="syntaxdefault">150.0</span><span class="syntaxkeyword">)
    }
}

public </span><span class="syntaxdefault">start_burn</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">taskid</span><span class="syntaxkeyword">)
{
    static </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">; </span><span class="syntaxdefault">id </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">taskid </span><span class="syntaxkeyword">- </span><span class="syntaxdefault">TASK_BURN
    
    </span><span class="syntaxkeyword">if (!</span><span class="syntaxdefault">is_user_connected</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">) || !</span><span class="syntaxdefault">is_user_alive</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
    {
        return
    }
    
    static </span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">3</span><span class="syntaxkeyword">]
    </span><span class="syntaxdefault">get_user_origin</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">)
    
    </span><span class="syntaxdefault">message_begin</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">MSG_ONE_UNRELIABLE</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iMsgStatusIcon</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">_</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">write_string</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"dmg_heat"</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">message_end</span><span class="syntaxkeyword">()
    
    if (~</span><span class="syntaxdefault">pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_flags</span><span class="syntaxkeyword">) & </span><span class="syntaxdefault">FL_INWATER </span><span class="syntaxkeyword">&& !</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_FREEZE </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">iUserFireDuration</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">]--
    }
    else
    {
        </span><span class="syntaxdefault">iUserFireDuration</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">0
        
        </span><span class="syntaxkeyword">if (</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_FREEZE </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
        {
            </span><span class="syntaxdefault">user_unfreeze</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_FREEZE </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">remove_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_FREEZE </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
        }
    }
    
    if (</span><span class="syntaxdefault">iUserFireDuration</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">])
    {
        if (</span><span class="syntaxdefault">pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_health</span><span class="syntaxkeyword">) > </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">FIRE_HURT</span><span class="syntaxkeyword">]))
        {
            </span><span class="syntaxdefault">set_pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_health</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_health</span><span class="syntaxkeyword">) - </span><span class="syntaxdefault">get_pcvar_float</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iCvars</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">FIRE_HURT</span><span class="syntaxkeyword">]))
            
            </span><span class="syntaxdefault">message_begin</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">MSG_BROADCAST</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">SVC_TEMPENTITY</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TE_SPRITE</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_coord</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">])
            </span><span class="syntaxdefault">write_coord</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">1</span><span class="syntaxkeyword">])
            </span><span class="syntaxdefault">write_coord</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">])
            </span><span class="syntaxdefault">write_short</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iSprFlame</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">10</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">180</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">message_end</span><span class="syntaxkeyword">()
            
            </span><span class="syntaxdefault">message_begin</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">MSG_ONE_UNRELIABLE</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iMsgStatusIcon</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">_</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">3</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_string</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"dmg_heat"</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">255</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">85</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">)
            </span><span class="syntaxdefault">message_end</span><span class="syntaxkeyword">()
        }
        else
        {
            </span><span class="syntaxdefault">iUserFireDuration</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">] = </span><span class="syntaxdefault">0
            
            </span><span class="syntaxkeyword">if (</span><span class="syntaxdefault">is_user_connected</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iUserFireAttacker</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">]))
            {
                </span><span class="syntaxdefault">ExecuteHamB</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Ham_Killed</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iUserFireAttacker</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">], </span><span class="syntaxdefault">false</span><span class="syntaxkeyword">)
            }
            else
            {
                </span><span class="syntaxdefault">ExecuteHamB</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Ham_Killed</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">false</span><span class="syntaxkeyword">)
            }
        }
    }
    
    if (</span><span class="syntaxdefault">iUserFireDuration</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">])
    {
        </span><span class="syntaxdefault">set_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">1.0</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"start_burn"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">taskid</span><span class="syntaxkeyword">)
    }
    else
    {
        </span><span class="syntaxdefault">message_begin</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">MSG_BROADCAST</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">SVC_TEMPENTITY</span><span class="syntaxkeyword">)
        </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TE_SMOKE</span><span class="syntaxkeyword">)
        </span><span class="syntaxdefault">write_coord</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">])
        </span><span class="syntaxdefault">write_coord</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">1</span><span class="syntaxkeyword">])
        </span><span class="syntaxdefault">write_coord</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">])
        </span><span class="syntaxdefault">write_short</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">iSprSmoke</span><span class="syntaxkeyword">)
        </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">7</span><span class="syntaxkeyword">)
        </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">30</span><span class="syntaxkeyword">)
        </span><span class="syntaxdefault">message_end</span><span class="syntaxkeyword">()
    }
}    

public </span><span class="syntaxdefault">user_freeze</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">taskid</span><span class="syntaxkeyword">)
{
    static </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">; </span><span class="syntaxdefault">id </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">taskid </span><span class="syntaxkeyword">- </span><span class="syntaxdefault">TASK_FREEZE
    
    </span><span class="syntaxkeyword">if (</span><span class="syntaxdefault">task_exists</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_BURN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
    {
        </span><span class="syntaxdefault">remove_task</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TASK_BURN </span><span class="syntaxkeyword">+ </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
        return
    }
    
    static </span><span class="syntaxdefault">Float</span><span class="syntaxkeyword">:</span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">3</span><span class="syntaxkeyword">]
    </span><span class="syntaxdefault">pev</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">pev_origin</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">] -= </span><span class="syntaxdefault">35.0
    
    message_begin</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">MSG_BROADCAST</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">SVC_TEMPENTITY</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TE_KILLBEAM</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">write_short</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">message_end</span><span class="syntaxkeyword">()
    
    </span><span class="syntaxdefault">message_begin</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">MSG_ONE_UNRELIABLE</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">iMsgStatusIcon</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">_</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">write_byte</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">3</span><span class="syntaxkeyword">)
    </span><span class="syntaxdefault">write_string</span><span class="syntaxkeyword">(</span><span cl...

Потребителски аватар
Irie
Newbie
Мнения: 16
Регистриран: съб юни 25, 2016 11:31 am
Баланс: Locked

пон авг 29, 2016 7:44 pm

Как да го направя, така че примерно определен флаг да има определен нож? Подобно на "ModelsMenu" ?

Отговори

Върни се в “AMX Mod (X)”

  • Информация
  • Кой е на линия

    Потребители, разглеждащи този форум: Няма регистрирани потребители и 1 гост