Half-Life и Adrenaline Gamer форум

Всё об игре в Халф-Лайф и АГ
Текущее время: 16 май 2024, 18:06

Часовой пояс: UTC + 5 часов [ Летнее время ]




Начать новую тему Ответить на тему  [ Сообщений: 2 ] 
Автор Сообщение
 Заголовок сообщения: eurohl plugin
СообщениеДобавлено: 30 май 2015, 23:39 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
15 май 2024, 10:28
Сообщения: 1025
Hello guys
I want to split this plugin to several plugins which consists of them !

1) eurohl_bombmsg ( %s activated bomb! ==> Show message when user activated bomb in crossfire maps )
Код:
public _trigger_multiple(const iEntity, const id)
{
   new n = find_ent_by_target(-1,"fire_button_texture")
   
   if (iEntity == n ) ////NUKEBUTTON   
   {
      if (is_user_alive(id))
      {
         new msg[64]
         get_pcvar_string(ehlBombMsg, msg, charsmax(msg))
         //
         if (msg[0]) // Check if is set bomb message
         {
            new name[32]
            get_user_name(id, name, charsmax(name))
            set_hudmessage(0, 255, 0, 0.75, 0.83, 0, 6.0, 10.0)
            show_hudmessage(0, msg, name)
         }
      }
      /*else
      {
         set_hudmessage(255, 0, 0, 0.65, 0.83, 0, 6.0, 10.0)
         show_hudmessage(0, "Plugin by [eurohl]")
      }*/
   }
   
}
2) blueRoomCodes (3 shot lamp to open blue room )
 
3) ham_strip_weapon ( takes a weapon from a player efficiently )
Код:
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;
}

stock ESContains(const Input[][], InputLenCount, const StringToCompare[])
{
   for (new i = 0;i<InputLenCount;i++)
   {
      if ( equal(Input[i],StringToCompare))
      {
         return 1
      }
   }
   
   return 0
}


//+Trim text
stock Float:str_to_float2(text[])
{
   trim(text)
   return str_to_float(text)
}

/* Functions */
//split up result into lines
stock ExplodeString( Output[][], Max, Size, Input[], Delimiter )
{
   new Idx, l = strlen(Input), Len;
   do Len += (1 + copyc( Output[Idx], Size, Input[Len], Delimiter ));
   while( (Len < l) && (++Idx < Max) )
   return Idx;
}

4) door_block ( Fixed hornet gun blocking )
Код:
public door_block(p, ent)
{
   //Fixed hornet gun blocking
   if (is_valid_ent(ent))
   {
      new class[32]
      pev(ent,pev_classname,class,charsmax(class))
      //
      if (equal(class,"hornet"))
      {
         return HAM_SUPERCEDE
      }
   }

   return HAM_IGNORED
}
Вложение:
eurohl1.7.rar [14.06 КБ]
Скачиваний: 189

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: eurohl plugin
СообщениеДобавлено: 10 июн 2015, 00:32 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
15 май 2024, 10:28
Сообщения: 1025
I found the first and also found the fourth :D of help me with others? :) only i need blueRoomCodes (3 shot lamp to open blue room )
 
Код:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN "door_unblock"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
   RegisterHam(Ham_Blocked,"func_door","door_block")
   // Add your code here...
}
public door_block(p, ent)
{
   //Fixed hornet gun blocking
   if (is_valid_ent(ent))
   {
      new class[32]
      pev(ent,pev_classname,class,charsmax(class))
      //
      if (equal(class,"hornet"))
      {
         return HAM_SUPERCEDE
      }
   }

   return HAM_IGNORED
}

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 2 ] 

Часовой пояс: UTC + 5 часов [ Летнее время ]


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 5


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
Создано на основе phpBB® Forum Software © phpBB Group
Русская поддержка phpBB