VIP Extra's

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

нед авг 07, 2016 10:34 am

<VIP Extra's>
[/size]

Author:[/size] M[/size]uHaBaM[/size]
Гледам, че на последък доста хора търся този плъгин и реших да направя такъв.
[shadow=blue]Описание[/shadow][/size]
Този плъгин дава на Админите (с определен флаг): HEgrenade, SmokeGrenade, x2 Flash, Armor, Health, Deagle .

[shadow=red]Списък с cvar-овe[/shadow][/size]:
  • vip_hp - +Колко HP да дава на VIP/Admin-a.
  • vip_armor : +Колко Armor да дава на VIP/Admin-a.
  • vip_he - Колкочество HEgrenade.
  • vip_flash - Количество FlashGrenade.
  • vip_smoke - Количество SmokeGrenade.
  • vip_deaglebp - Колко патрона да има Дийгъла.
  • vip_flag - Флаг-а, с който да се ползва плъгина.
[shadow=green]Код[/shadow][/size]:

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

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

#define PLUGIN_VERSION "1.0"

</span><span class="syntaxdefault">new cvar_hp</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> cvar_armor</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> cvar_heamount</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> cvar_flashamount</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> cvar_smokeamount</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> cvar_vipflag</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> cvar_deagle_bp</span><span class="syntaxkeyword">;

</span><span class="syntaxdefault">public plugin_init</span><span class="syntaxkeyword">()
{
</span><span class="syntaxdefault">   register_plugin</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"VIP Extra's"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> PLUGIN_VERSION</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"MuHaBaM"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">   RegisterHam</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Ham_Spawn</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"player"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"player_spawn"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 1</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">   
   cvar_hp </span><span class="syntaxkeyword">=</span><span class="syntaxdefault">       register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"vip_hp"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"25"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">   cvar_armor</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">     register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"vip_armor"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"100"</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> 
   cvar_heamount </span><span class="syntaxkeyword">=</span><span class="syntaxdefault">      register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"vip_he"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"1"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">   cvar_flashamount </span><span class="syntaxkeyword">=</span><span class="syntaxdefault">   register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"vip_flash"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"2"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">   cvar_smokeamount </span><span class="syntaxkeyword">=</span><span class="syntaxdefault">   register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"vip_smoke"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"1"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">   cvar_vipflag </span><span class="syntaxkeyword">=</span><span class="syntaxdefault">      register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"vip_flag"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"b"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">   cvar_deagle_bp</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">    register_cvar</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"vip_deaglebp"</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"120"</span><span class="syntaxkeyword">)
}

</span><span class="syntaxdefault">public player_spawn</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)
{
</span><span class="syntaxdefault">   if</span><span class="syntaxkeyword">(!</span><span class="syntaxdefault">is_user_alive</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">))
</span><span class="syntaxdefault">      return HAM_IGNORED</span><span class="syntaxkeyword">;
</span><span class="syntaxdefault">   
   new string</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">];
</span><span class="syntaxdefault">   get_pcvar_string</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">cvar_vipflag</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> string</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> charsmax</span><span class="syntaxkeyword">(string))
</span><span class="syntaxdefault">   
   if</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">get_user_flags</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">&</span><span class="syntaxdefault"> read_flags</span><span class="syntaxkeyword">(string))
</span><span class="syntaxdefault">   </span><span class="syntaxkeyword">{
</span><span class="syntaxdefault">      set_user_health</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> get_user_health</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">+</span><span class="syntaxdefault"> get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">cvar_hp</span><span class="syntaxkeyword">))
</span><span class="syntaxdefault">      
      set_user_armor</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> get_user_armor</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">+</span><span class="syntaxdefault"> get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">cvar_armor</span><span class="syntaxkeyword">))
</span><span class="syntaxdefault">      
      give_item</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"weapon_hegrenade"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">      cs_set_user_bpammo</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> CSW_HEGRENADE</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">cvar_heamount</span><span class="syntaxkeyword">))
</span><span class="syntaxdefault">      
      give_item</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"weapon_flashbang"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">      cs_set_user_bpammo</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> CSW_FLASHBANG</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">cvar_flashamount</span><span class="syntaxkeyword">))
</span><span class="syntaxdefault">      
      give_item</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"weapon_smokegrenade"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">      cs_set_user_bpammo</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> CSW_SMOKEGRENADE</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">cvar_smokeamount</span><span class="syntaxkeyword">))
</span><span class="syntaxdefault">      
      give_item</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">"weapon_deagle"</span><span class="syntaxkeyword">)
</span><span class="syntaxdefault">      cs_set_user_bpammo</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">id</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> CSW_DEAGLE</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> get_pcvar_num</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">cvar_deagle_bp</span><span class="syntaxkeyword">))
</span><span class="syntaxdefault">   </span><span class="syntaxkeyword">}
</span><span class="syntaxdefault">   
   return HAM_IGNORED</span><span class="syntaxkeyword">;
} </span><span class="syntaxdefault"></span> 
Това е първият ми плъгин. При бъгове пишете в темата. :) [/size]

Плъгин-а е написан от мен от първото до последното редче. Забранявам копирането му в др. сайтове/форуми![/size]

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

нед авг 07, 2016 1:44 pm


Потребителски аватар
MuHaBaM
Member
Мнения: 56
Регистриран: ср май 25, 2016 12:50 pm
Баланс: Locked

нед авг 07, 2016 2:04 pm

[quote="TheRedShoko"]Трябва да си влязъл в системата, за да можеш да виждаш линковете[/quote]

Как така вирус? -,0 ОМГ... Сега ще дам код-а, а ако някой го поиска компилиран ще му обесня как... Благодаря Шоко, ще видя да си сваля антивирусна. :)

[shadow=red]НОВО:[/shadow] премахнат е файла и е сложен код. :)

Отговори

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

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

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