JailBreak Days by val4o0o0

Неодобрените плъгини биват прехвърляни в този раздел. Не препоръчваме да ги ползвате, тъй като най-вероятно съдържат бъгове или същестуват такива плъгини, които вършат по-добра работа от тези тук.
Отговори
Потребителски аватар

Автор на темата
southdivision буратино
Потребител
Потребител
Мнения: 279
Регистриран: 14 окт 2016, 23:17
Местоположение: София
Се отблагодари: 8 пъти
Получена благодарност: 5 пъти
Години: 22
Контакти:

JailBreak Days by val4o0o0

Мнение от southdivision буратино » 30 яну 2017, 20:07

Автор: val4o0o0

Версия: 1.0

Описание:

Меню с дни за JailBreak мод. Достъп до менюто има само Simon!
Дните са::
(1) Spartan Day
(2) Free Day
(3) Night Crwaler Day
(4) Knife Day
(5) War Day
(6) HNS Day
(7) Shark Day


Cvars: Няма


Команди:
/days, /daysmenu
Прикачени файлове
Daysmenu_val4o0o0.rar
(166.27 KиБ) Свален 71 пъти
Daysmenu_val4o0o0.rar
(166.27 KиБ) Свален 71 пъти

Потребителски аватар

joksss
Потребител
Потребител
Мнения: 15
Регистриран: 18 дек 2016, 13:48

JailBreak Days by val4o0o0

Мнение от joksss » 16 мар 2018, 22:01

А ще можеш ли да го направиш да е достъпно за админи с флаг "c" и при HNS ден надзирателите да не могат да бъдат убивани.

Потребителски аватар

OciXCrom TM
Администратор
Администратор
Мнения: 5038
Регистриран: 06 окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 56 пъти
Получена благодарност: 470 пъти
Години: 21
Контакти:

JailBreak Days by val4o0o0

Мнение от OciXCrom TM » 16 мар 2018, 23:41

Това е официално най-грозният код който някога съм виждал. Скоро ще изработя уникален плъгин за дни и ще го кача тук.

Код: Избери всички

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <jbextreme>
#include <fakemeta>
#include <screenfade_util>
#include <colorchat>
#include <hamsandwich>


#define TASKID 4621
#define TASKID2 4627
#define TASKID3 5513

const GUNS_BITSUM = 1<<CSW_P228 | 1<<CSW_ELITE | 1<<CSW_FIVESEVEN | 1<<CSW_USP | 1<<CSW_GLOCK18 | 1<<CSW_DEAGLE
const SHOTGUNS_BITSUM = 1<<CSW_XM1014 | 1<<CSW_M3 
const SMGS_BITSUM = 1<<CSW_MAC10 | 1<<CSW_UMP45 | 1<<CSW_MP5NAVY | 1<<CSW_TMP | 1<<CSW_P90 
const RIFFLES_BITSUM = 1<<CSW_AUG | 1<<CSW_GALIL | 1<<CSW_FAMAS | 1<<CSW_M249 | 1<<CSW_M4A1 | 1<<CSW_SG552 | 1<<CSW_AK47 
const SNIPERS_BITSUM = 1<<CSW_SCOUT | 1<<CSW_SG550 | 1<<CSW_AWP | 1<<CSW_G3SG1 
const WEAPONS_BITSUM = GUNS_BITSUM | SHOTGUNS_BITSUM | SMGS_BITSUM | RIFFLES_BITSUM | SNIPERS_BITSUM


new const PREFIX[] = "[JailBreak-Days]";
const CountSeconds = 60;
new g_iCountTime;
new hnssound[] = "sound/race_go.mp3"

new day = 0;
new g_shark = 0
new g_knife = 0
new gspeed[33]
new g_maxplayers
new g_hide[33]

public plugin_init()
{
g_maxplayers = get_maxplayers()
register_plugin("JailBreak DaysMenu", "1.0", "val"); // pozdravleniq do avtora za suzdavane na nai-grozniq kod v istoriqta na kodovete

register_logevent("eRoundEnd", 2, "1=Round_End"); 
register_logevent( "eRoundStart", 2, "1=Round_Start" );
register_clcmd( "say /days", "fwdSpawnPlayer" )
register_clcmd( "say /daysmenu", "fwdSpawnPlayer" )
register_event("CurWeapon", "event_CurWeapon", "be", "1=1");
RegisterHam(Ham_TakeDamage, "player", "PreTakeDamage")
}

public PreTakeDamage(iVictim, iInflictor, iAttacker)
	return (day == 2 && is_user_connected(iVictim) && cs_get_user_team(iVictim) == CS_TEAM_CT) ? HAM_SUPERCEDE : HAM_IGNORED

public event_CurWeapon(id) {
if(is_user_alive(id)) {
if(g_hide[id] == 1) {
set_pev(id, pev_viewmodel2, "models/v_knife.mdl")
if(get_user_team(id) ==2) set_user_maxspeed(id, 500.0);
}

if(gspeed[id] == 1) {
set_user_maxspeed(id, 500.0);
}
}
}


public tasker(TASK) {
new id = TASK - TASKID3
new name[32]
get_user_name(id,name,31)

if(g_hide[id] == 1 && get_user_team(id) == 1 && has_user_any_weapon(id)) {
drop_user_weapon(id)
}

if(g_knife == 1 && has_user_any_weapon(id)) {
drop_user_weapon(id)
}

if(get_user_team(id) == 2 && g_shark == 1 && has_user_any_weapon(id)) {
drop_user_weapon(id)
}

}

public plugin_precache()
{
   precache_generic(hnssound)
}

public eRoundStart()
{
for(new id=0;id<=g_maxplayers;id++)
{
if(is_user_connected(id)) 
{
set_user_godmode(id,0)
set_user_rendering(id)
gspeed[id] = 0
g_hide[id] = 0
set_user_maxspeed(id,0.0)
set_task(1.0,"tasker",id+TASKID3,_,_,"b")
}
}
g_knife = 0
g_shark = 0
day = 0; //F*KIN script,be sure that day == 0
}

public eRoundEnd()
{
day = 0;
g_knife = 0
g_shark = 0
remove_task()

for(new id=0;id<=g_maxplayers;id++)
{
if(is_user_connected(id)) 
{
remove_task(id+TASKID3)
}
}
}

public ResModel(id)
{
     new iPlayers[32], iNum, iPid;
     get_players( iPlayers, iNum, "a" );

     for( new i; i < iNum; i++ )
     {
      iPid = iPlayers[i];
      cs_reset_user_model(iPid)
     }
}
 public fwdSpawnPlayer(id)
 {
      if(!(get_user_flags(id) & ADMIN_KICK))
	  {
		ColorChat(id,GREEN,"^x04[JailBreak-Days]^x01 Nqmash dostup!");
		return PLUGIN_HANDLED
	  }
	  
      if (cs_get_user_team(id) == CS_TEAM_CT)
      {
      if(is_user_alive(id))
      {
      if(day == 0)
      {
      JBDay(id);
      }
      else
      {
      ColorChat(id,GREEN,"^x04[JailBreak-Days]^x01  Moje da polzwate days na drugiq rund!");
      }
      }
      }
      else
      {
      ColorChat(id,GREEN,"^x04[JailBreak-Days]^x01 Ti ne si CT!");
      }
      return PLUGIN_HANDLED
}
 
public Count() 
{ 
set_hudmessage( 0 , 255 , 0 , -1.0 , 0.28 , 2 , 1.1 , 1.1 , 0.01 , 0.01 ); 
show_hudmessage( 0 , "The prisoners have %d seconds to hide!" , g_iCountTime-- );
} 

 public JBDay(id)
 {
   if(!is_user_simon(id))
   {
   ColorChat(id,GREEN,"^x04%s^x01 Only^x03 Simon^x01 have access to days menu", PREFIX)
   return PLUGIN_HANDLED; 
   }
    
   new menu1 = menu_create("[JailBreak-Days] JB DayMenu", "menu_handler");

   menu_additem(menu1, "Spartan Day", "1", 0);
   menu_additem(menu1, "Free Day", "2", 0);
   menu_additem(menu1, "Night Crawler Day", "3", 0);
   menu_additem(menu1, "Knife Day", "4", 0);
   menu_additem(menu1, "War Day", "5", 0);
   menu_additem(menu1, "HNS Day", "6", 0);
   menu_additem(menu1, "Shark Day", "7", 0);
 
   menu_setprop(menu1, MPROP_EXIT, MEXIT_ALL);
   menu_display(id, menu1, 0);
   
   return PLUGIN_CONTINUE;
 }

public menu_handler(id, menu, item)
{
   
 if( item == MENU_EXIT )
 {
       menu_destroy(menu);
       return PLUGIN_HANDLED;
 }
   
   
 new data[6], iName[64];
 new access, callback;

 menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);

 new key = str_to_num(data);
           
 switch(key)
 {
 case 1:
 {
 SpartanDay(id)
 day = 1;
 }
 case 2:
 {
 ColorChat(0,GREEN,"^x04%s^x01 Dnes e swoboden den.", PREFIX)
 set_hudmessage(id, 255, 0, 0.60, 0.12, 0, 6.0, 60.0)
 show_hudmessage(id, "Today is: Free-Day")
 day = 1;
 }
 case 3:
 {
 NightDay(id)
 day = 1;
 }
 case 4:
 {
 KnifeDay(id)
 day = 1;
 }
 case 5:
 {
 WarDay(id)
 day = 1;
 }
 case 6:
 {
 HideDay(id)
 day = 2;
 }
 case 7:
 {
 SharkDay(id)
 day = 1;
 }
 }

 menu_destroy(menu);
 return PLUGIN_HANDLED;
}

public client_disconnect(id) {
remove_task(id+TASKID3)
remove_task(id+TASKID)
remove_task(id+TASKID2)
}

public SharkDay(id)
{
    new iPlayers[32]
    new iNum
    new id

    get_players( iPlayers, iNum )

    for( new i = 0; i < iNum; i++ )
    {
    id = iPlayers[i]
    if( !is_user_alive( id ) )
    {
    continue;
    }
    set_hudmessage(0, 255, 0, 0.60, 0.12, 0, 6.0, 60.0)
    show_hudmessage(id, "Today is: Shark Day")
    g_shark = 1
    ColorChat(id,GREEN,"^x04%s^x01 Dnes shte igraem^x03 Shark Day^x01! Nadziratelite sa blagosloweni ot bog", PREFIX)

    strip_user_weapons( id )
    give_item( id, "weapon_knife" )

    if (cs_get_user_team(id) == CS_TEAM_CT)
    {
       set_user_health(id, 250);
       set_user_noclip (id, true);
    }

    if (cs_get_user_team(id) == CS_TEAM_T)
    {
      set_user_health(id, 100);
      give_item(id, "weapon_ak47")
      cs_set_user_bpammo( id, CSW_AK47, 200 );
      give_item(id, "weapon_deagle");
      cs_set_user_bpammo( id, CSW_DEAGLE, 200 );
    }
    }
}

public NightDay(id)
{
    new iPlayers[32]
    new iNum
    new id

    get_players( iPlayers, iNum )

    for( new i = 0; i < iNum; i++ )
    {
    id = iPlayers[i]
    if( !is_user_alive( id ) )
    {
      continue;
    }
    set_hudmessage(0, 255, 0, 0.60, 0.12, 0, 6.0, 60.0)
    show_hudmessage(id, "Today is: Night Crawler Day")

    ColorChat(id,GREEN,"^x04%s^x01 Dnes shte igraem^x03 Night Crawler Day^x01! Zatwornicite trqbwa da ubiqt wsichi nadziratili!", PREFIX)

    strip_user_weapons( id )
    give_item( id, "weapon_knife" )

    if (cs_get_user_team(id) == CS_TEAM_CT)
    {
          set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
          set_user_health(id,500);
          set_user_gravity(id,0.5);
          gspeed[id] = 1;
    }

    if (cs_get_user_team(id) == CS_TEAM_T)
    {
      set_user_health(id, 200);
      give_item(id, "weapon_ak47")
      cs_set_user_bpammo( id, CSW_AK47, 200 );
      give_item(id, "weapon_deagle");
      cs_set_user_bpammo( id, CSW_DEAGLE, 200 );
    }
    }
}

public SpartanDay(id)
{
    new iPlayers[32]
    new iNum
    new id

    get_players( iPlayers, iNum )

    for( new i = 0; i < iNum; i++ )
    {
    id = iPlayers[i]
    if(cs_get_user_team(id) == CS_TEAM_T)
    {
    strip_user_weapons(id)
    set_user_health(id,500)
    }
    if( !is_user_alive( id ) )
    {
    continue;
    }
    set_hudmessage(0, 255, 0, 0.60, 0.12, 0, 6.0, 60.0)
    show_hudmessage(id, "Today is: Spartan Day")

    ColorChat(id,GREEN,"^x04%s^x01 Dnes shte igraem^x03 Spartan Day", PREFIX)

    if(cs_get_user_team(id) == CS_TEAM_T)
    {
    give_item( id, "weapon_knife" )
    give_item( id, "weapon_deagle")
    give_item( id, "weapon_shield")
    cs_set_user_bpammo( id, CSW_DEAGLE, 200 );
    set_user_health(id, 100);
    }
    }
}

public KnifeDay(id)
{
     
   new iPlayers[32]
   new iNum
   new id

   get_players( iPlayers, iNum )

   for( new i = 0; i < iNum; i++ )
   {
   id = iPlayers[i]
   if( !is_user_alive(id) )
   {
   continue;
   }
   set_hudmessage(0, 255, 0, 0.60, 0.12, 0, 6.0, 60.0)
   show_hudmessage(id, "Today is: Knife Day")
   g_knife = 1
   ColorChat(id,GREEN,"^x04%s^x01 Dnes shte igraem^x03 Knife Day", PREFIX)
   
   strip_user_weapons(id)
   give_item( id, "weapon_knife" )

   if(cs_get_user_team(id)==CS_TEAM_CT)
   {
   set_user_health(id,250)
   }
   
   if(cs_get_user_team(id) == CS_TEAM_T)
   {
      set_user_health(id,100)
   }
   }
}

public WarDay(id)
{
    new iPlayers[32]
    new iNum
    new id

    get_players( iPlayers, iNum )

    for( new i = 0; i < iNum; i++ )
    {
    id = iPlayers[i]
    if( !is_user_alive( id ) )
    {
    continue;
    }
    set_hudmessage(0, 255, 0, 0.60, 0.12, 0, 6.0, 60.0)
    show_hudmessage(id, "Today is: War Day")

    ColorChat(id,GREEN,"^x04%s^x01 Dnes shte igraem^x03 War Day^x01 Neka nai-dobriq ekip da pobedi!", PREFIX)

    strip_user_weapons(id)
    give_item(id, "weapon_knife")
    give_item(id, "weapon_m3")
    cs_set_user_bpammo( id, CSW_M3, 200 );

    switch(cs_get_user_team(id))
    {
      case CS_TEAM_CT: set_user_health(id,500);
      case CS_TEAM_T: set_user_health(id,100);
    }
    }
}

public RemoveFreeze(TASK) {
new id = TASK - TASKID
if(is_user_alive(id)) {
set_pev(id, pev_flags, (pev(id, pev_flags) & ~FL_FROZEN))
}
}

public RemoveFade(TASK) {
new id = TASK - TASKID2
if(is_user_alive(id)) {
UTIL_ScreenFade(id)
}
}

public HideDay(id)
{
    set_hudmessage(0, 255, 0, 0.60, 0.12, 0, 6.0, 60.0)
    show_hudmessage(id, "Today is: HNS Day")
    client_cmd(0, "mp3 play %s", hnssound)

    ColorChat(id,GREEN,"^x04%s^x01 Dnes shte igraem^x03 HNS Day^x01 Zatwornicite imat^x03 60^x01 sekundi za da se skriqt!", PREFIX)

    strip_user_weapons(id)
    give_item( id, "weapon_knife" )

    g_hide[id] = 1
    if (cs_get_user_team(id) == CS_TEAM_CT)
    {
              set_user_godmode(id,1)
              set_user_gravity(id,0.4)
              set_pev(id, pev_flags, (pev(id, pev_flags) | FL_FROZEN));
              set_task(60.0,"RemoveFreeze",id+TASKID)
              UTIL_FadeToBlack(id)
              set_task(60.0,"RemoveFade",id+TASKID2)  
     }
    
    if(cs_get_user_team(id) == CS_TEAM_T)
    {
      set_user_health(id,1);
    }
    g_iCountTime = CountSeconds;
    set_task( 1.0 , "Count" , _ , _ , _ , "a" , g_iCountTime );
} 

has_user_any_weapon( id )
{
    return pev(id, pev_weapons) & WEAPONS_BITSUM
}  


stock drop_user_weapon(id){
    new szWeaponName[32], iWeapon = get_user_weapon(id)
    get_weaponname(iWeapon, szWeaponName, 31)
    engclient_cmd(id, "drop", szWeaponName)
}  

Отговори

Върни се в “Неодобрени/стари плъгини”

Кой е на линия

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