hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.10.31. 15:31



Jelenlévő felhasználók

Jelenleg 293 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 291 vendég

A legtöbb felhasználó (2883 fő) 2025.07.30. 16:00-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot], Google [Bot]az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása Hozzászólás a témához  [2 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: megashop
HozzászólásElküldve:2012.07.27. 23:05 
Offline
Tag
Avatar

Csatlakozott:2010.06.09. 21:30
Hozzászólások:36
hello azt akarom kérdezni meg lehete ugy csinálni hogy az adminak olcsoban kerüljon mind a játékosnak a tárgyak
Kód:
  1. ********************************************************/

  2. /* Mega Shop by: TheArmagedon                           */     

  3. /*                                                      */

  4. /* ##Weapon Shop##                                      */

  5. /* ##Extras Shop##                                      */

  6. /* ##Admin Shop##                                       */

  7. /*                                                      */             

  8. /* Change the Cvars on mega_shop.cfg                    */

  9. /*                                                      */

  10. /* Changelog:                                           */

  11. /* v1.1                                                 */

  12. /* amx_ms_pweapon_damage [DMG] = Default: 2.0           */

  13. /*                                                      */

  14. /* v1.2                                                 */

  15. /* amx_ms_oneround [1/0] = Default: 1                   */

  16. /*                                                      */     

  17. /* Sorry if my english is bad.                          */

  18. /*                                                      */

  19. /********************************************************/

  20.  

  21. ////////////////////////////////////////////////////////////////////////////////////////////////////

  22. // INCLUDES

  23. ////////////////////////////////////////////////////////////////////////////////////////////////////

  24. #include <amxmodx>

  25. #include <fun>

  26. #include <fakemeta_util>

  27. #include <hamsandwich>

  28. #include <amxmisc>

  29. #include <cstrike>

  30. #include <engine>

  31. ////////////////////////////////////////////////////////////////////////////////////////////////////

  32. // Define

  33. ////////////////////////////////////////////////////////////////////////////////////////////////////

  34. #define HE_GRENADE      (1<<0)

  35. #define SMOKE_GRENADE   (1<<1)

  36. #define FLASH_GRENADE   (1<<2)

  37.  

  38. #define MAX_PLAYERS     32

  39. #define MAXSLOTS 32

  40.  

  41. ////////////////////////////////////////////////////////////////////////////////////////////////////

  42. // COLORCHAT

  43. ////////////////////////////////////////////////////////////////////////////////////////////////////

  44. enum Color

  45. {

  46.         YELLOW = 1, // Yellow

  47.         GREEN, // Green Color

  48.         TEAM_COLOR, // Red, grey, blue

  49.         GREY, // grey

  50.         RED, // Red

  51.         BLUE, // Blue

  52. }

  53.  

  54. new TeamInfo;

  55. new SayText;

  56. new MaxSlots;

  57.  

  58.  

  59. new TeamName[][] =

  60. {

  61.         "",

  62.         "TERRORIST",

  63.         "CT",

  64.         "SPECTATOR"

  65. }

  66. new bool:IsConnected[MAXSLOTS + 1];

  67.  

  68. ////////////////////////////////////////////////////////////////////////////////////////////////////

  69. // Pcvars

  70. ////////////////////////////////////////////////////////////////////////////////////////////////////

  71. new plugin_onoff, specspeed, speclife, specgrav, gravcost, ammocost, speccost, bhopcost, silentcost, glowcost

  72. new gravityam, bhop_onoff, ammo_onoff, grav_onoff, spec_onoff, silent_onoff, glow_onoff, noclip_onoff

  73. new noclipcost, nocliptime, gmodetime, gmodecost, gmode_onoff, money_onoff, pweapdmgmulti, one_round

  74. // Menus-pcvar

  75. new admmenuon, extrason, weaponson

  76. // Weap.Menu - pcvar

  77. new powerawp, powerak, powercolt

  78. new akcost, awpcost, coltcost

  79.  

  80. // NOCLIP

  81. #define GetPlayerHullSize(%1)  ( ( pev ( %1, pev_flags ) & FL_DUCKING ) ? HULL_HEAD : HULL_HUMAN )

  82.  

  83. enum Coord_e { Float:x, Float:y, Float:z };

  84.  

  85. ////////////////////////////////////////////////////////////////////////////////////////////////////

  86. // Bool's

  87. ////////////////////////////////////////////////////////////////////////////////////////////////////

  88. new bool:has_awp[33]

  89. new bool:has_ak[33]

  90. new bool:has_colt[33]

  91. new bool:g_Gravity[33]

  92. new bool:g_UnAmmo[33]

  93. new bool:g_Alive[33]

  94. new bool:g_SilentF[33]

  95. new bool:g_Glow[33]

  96. new bool:g_GodMode[33]

  97. new bool:g_NoClip[33]

  98. new bool:oneRound[33]

  99.  

  100. // Bhop

  101. new bool:g_HasBhop[33]

  102. new g_iCdWaterJumpTime[33]

  103.  

  104.  

  105. ////////////////////////////////////////////////////////////////////////////////////////////////////

  106. // Plugin Start

  107. ////////////////////////////////////////////////////////////////////////////////////////////////////

  108. public plugin_init()

  109. {

  110.         // Register Plugin

  111.         register_plugin("Mega Shop","1.2","TheArmagedon")

  112.  

  113.         // Register Lang

  114.         register_dictionary("mega_shop.txt")

  115.  

  116.         // Say

  117.         register_clcmd("say /megashop","ovomenu");

  118.         register_clcmd("say_team /megashop","ovomenu");

  119.         register_clcmd("say .megashop","ovomenu");

  120.         register_clcmd("say_team .megashop","ovomenu");

  121.         register_clcmd("say /mshop","ovomenu");

  122.         register_clcmd("say_team /mshop","ovomenu");

  123.         register_clcmd("say .mshop","ovomenu");

  124.         register_clcmd("say_team .mshop","ovomenu");

  125.         register_clcmd("say /shop", "ovomenu");

  126.         register_clcmd("say_team /shop", "ovomenu");

  127.  

  128.         // Cvar's

  129.         plugin_onoff    = register_cvar("amx_mega_shop", "1")

  130.         one_round       = register_cvar("amx_ms_oneround", "1")

  131.         grav_onoff      = register_cvar("amx_ms_gravity", "1")

  132.         spec_onoff      = register_cvar("amx_ms_special", "1")

  133.         bhop_onoff      = register_cvar("amx_ms_bunnyhop", "1")

  134.         ammo_onoff      = register_cvar("amx_ms_ammo", "1")

  135.         silent_onoff    = register_cvar("amx_ms_silentf", "1")

  136.         glow_onoff      = register_cvar("amx_ms_glow", "1")

  137.         noclip_onoff    = register_cvar("amx_ms_noclip", "1")

  138.         gmode_onoff     = register_cvar("amx_ms_godmode", "1")

  139.         money_onoff     = register_cvar("amx_ms_money", "1")

  140.         gravityam       = register_cvar("amx_ms_gravity_amount", "0.5")

  141.         specspeed       = register_cvar("amx_ms_special_speed", "500.0")

  142.         speclife        = register_cvar("amx_ms_special_life", "150")

  143.         specgrav        = register_cvar("amx_ms_special_gravity", "0.7")

  144.         weaponson       = register_cvar("amx_ms_weapon_menu", "1")

  145.         extrason        = register_cvar("amx_ms_extra_menu", "1")

  146.         admmenuon       = register_cvar("amx_ms_admin_menu", "1")

  147.         powerawp        = register_cvar("amx_ms_weapon_awp", "1")

  148.         powerak         = register_cvar("amx_ms_weapon_ak47", "1")

  149.         powercolt       = register_cvar("amx_ms_weapon_m4a1", "1")

  150.         // Cvar's --- Price - EXTRAS

  151.         gravcost        = register_cvar("amx_ms_gravity_cost", "9000")

  152.         ammocost        = register_cvar("amx_ms_ammo_cost", "16000")

  153.         speccost        = register_cvar("amx_ms_special_cost", "13000")

  154.         bhopcost        = register_cvar("amx_ms_bhop_cost", "15000")

  155.         silentcost      = register_cvar("amx_ms_silentf_cost", "7000")

  156.         glowcost        = register_cvar("amx_ms_glow_cost", "3000")

  157.         // Cvar's --- Price/dmg - WEAPONS

  158.         awpcost         = register_cvar("amx_ms_awp_cost", "16000")

  159.         akcost          = register_cvar("amx_ms_ak47_cost", "15000")

  160.         coltcost        = register_cvar("amx_ms_colt_cost", "15000")

  161.         pweapdmgmulti   = register_cvar("amx_ms_pweapon_damage", "2.0") // 2.0 Double DMG

  162.         // Cvar's --- Price - ADMIN MENU

  163.         noclipcost      = register_cvar("amx_ms_noclip_cost", "15000")

  164.         gmodecost       = register_cvar("amx_ms_godmod_cost", "16000")

  165.         nocliptime      = register_cvar("amx_ms_noclip_time", "10.0")

  166.         gmodetime       = register_cvar("amx_ms_godmod_time", "10.0")

  167.  

  168.         // Bhop

  169.         RegisterHam(Ham_Player_Jump, "player", "Player_Jump")

  170.         register_forward(FM_UpdateClientData, "UpdateClientData")

  171.         register_forward(FM_CmdStart, "CmdStart")

  172.  

  173.         // AMMO

  174.         register_event("CurWeapon" , "event_CurWeapon" , "be" , "1=1");

  175.  

  176.         // Weapons

  177.         register_event( "Damage", "event_damage", "be" )

  178.  

  179.         // Death

  180.         register_event( "DeathMsg", "EventDeath", "a");

  181.  

  182.         // COLORCHAT

  183.         TeamInfo = get_user_msgid("TeamInfo");

  184.         SayText = get_user_msgid("SayText");

  185.         MaxSlots = get_maxplayers();

  186.  

  187.  

  188.         // ROUND START

  189.         register_logevent( "Event_RoundStart", 2, "1=Round_Start" );

  190.  

  191.  

  192. }

  193. ////////////////////////////////////////////////////////////////////////////////////////////////////

  194. // Precache Model

  195. ////////////////////////////////////////////////////////////////////////////////////////////////////

  196. public plugin_precache() {

  197.         precache_model("models/v_awp.mdl")

  198.         precache_model("models/v_ak47.mdl")

  199.         precache_model("models/v_m4a1.mdl")

  200. }

  201. ////////////////////////////////////////////////////////////////////////////////////////////////////

  202. // STOCKS

  203. ////////////////////////////////////////////////////////////////////////////////////////////////////

  204. stock maxclip(wpnid)

  205. {

  206.  

  207.         static ca;

  208.         ca = 0;

  209.  

  210.         switch (wpnid)

  211.         {

  212.                 case CSW_P228 : ca = 13;

  213.                 case CSW_SCOUT : ca = 10;

  214.                 case CSW_HEGRENADE : ca = 0;

  215.                 case CSW_XM1014 : ca = 7;

  216.                 case CSW_C4 : ca = 0;

  217.                 case CSW_MAC10 : ca = 30;

  218.                 case CSW_AUG : ca = 30;

  219.                 case CSW_SMOKEGRENADE : ca = 0;

  220.                 case CSW_ELITE : ca = 15;

  221.                 case CSW_FIVESEVEN : ca = 20;

  222.                 case CSW_UMP45 : ca = 25;

  223.                 case CSW_SG550 : ca = 30;

  224.                 case CSW_GALI : ca = 35;

  225.                 case CSW_FAMAS : ca = 25;

  226.                 case CSW_USP : ca = 12;

  227.                 case CSW_GLOCK18 : ca = 20;

  228.                 case CSW_AWP : ca = 10;

  229.                 case CSW_MP5NAVY : ca = 30;

  230.                 case CSW_M249 : ca = 100;

  231.                 case CSW_M3 : ca = 8;

  232.                 case CSW_M4A1 : ca = 30;

  233.                 case CSW_TMP : ca = 30;

  234.                 case CSW_G3SG1 : ca = 20;

  235.                 case CSW_FLASHBANG : ca = 0;

  236.                 case CSW_DEAGLE : ca = 7;

  237.                 case CSW_SG552 : ca = 30;

  238.                 case CSW_AK47 : ca = 30;

  239.                 case CSW_P90 : ca = 50;

  240.         }

  241.         return ca;

  242. }

  243.  

  244.  

  245. stock nade_flags()

  246. {

  247.         static buffer[8];

  248.  

  249.         return read_flags(buffer);

  250. }

  251.  

  252. stock log_kill(killer, victim, weapon[],headshot) {

  253.         user_silentkill( victim );

  254.  

  255.         message_begin( MSG_ALL, get_user_msgid( "DeathMsg" ), {0,0,0}, 0 );

  256.         write_byte( killer );

  257.         write_byte( victim );

  258.         write_byte( headshot );

  259.         write_string( weapon );

  260.         message_end();

  261.  

  262.         new kfrags = get_user_frags( killer );

  263.         set_user_frags( killer, kfrags++ );

  264.         new vfrags = get_user_frags( victim );

  265.         set_user_frags( victim, vfrags++ );

  266.  

  267.         return  PLUGIN_CONTINUE

  268. }

  269. ////////////////////////////////////////////////////////////////////////////////////////////////////

  270. // IS USER ALIVE

  271. ////////////////////////////////////////////////////////////////////////////////////////////////////

  272. public Check_Alive(id)

  273. {

  274.         g_Alive[id] = bool:is_user_alive(id)

  275. }

  276. ////////////////////////////////////////////////////////////////////////////////////////////////////

  277. // Death EVENT

  278. ////////////////////////////////////////////////////////////////////////////////////////////////////

  279. public EventDeath( ) {

  280.  

  281.         new iVictim = read_data( 2 );

  282.  

  283.         disableall(iVictim)

  284.  

  285.         g_Alive[iVictim] = bool:is_user_alive(iVictim)

  286.  

  287.         return PLUGIN_CONTINUE;

  288. }

  289. ////////////////////////////////////////////////////////////////////////////////////////////////////

  290. // ROUND START

  291. ////////////////////////////////////////////////////////////////////////////////////////////////////

  292. public Event_RoundStart(  ) {

  293.  

  294.         new iPlayers[32], iNum

  295.         get_players( iPlayers, iNum, "c" );

  296.  

  297.         for(new i; i < iNum; i++)

  298.                 disableall(iPlayers[i])

  299.  

  300. }

  301. ////////////////////////////////////////////////////////////////////////////////////////////////////

  302. // UNLIMITED AMMO

  303. ////////////////////////////////////////////////////////////////////////////////////////////////////

  304. public event_CurWeapon(id)

  305. {

  306.         if(!is_user_alive(id))

  307.                 return PLUGIN_CONTINUE;

  308.  

  309.         if(g_UnAmmo[id])

  310.         {

  311.                 static wpnid, clip;

  312.                 wpnid = read_data(2);

  313.                 clip = read_data(3);

  314.  

  315.                 give_ammo(id , wpnid , clip);

  316.         }

  317.  

  318.         return PLUGIN_CONTINUE;

  319. }

  320. ////////////////////////////////////////////////////////////////////////////////////////////////////

  321. // WELCOME MSG / CONFIG

  322. ////////////////////////////////////////////////////////////////////////////////////////////////////

  323. public client_putinserver(id)

  324. {

  325.         set_task(8.0, "sv_msg", id)

  326.         set_task(150.0, "sv_msg", id, _, _, "b")

  327. }

  328. public plugin_cfg()

  329. {

  330.         new icfg[32]

  331.         get_configsdir(icfg, sizeof icfg - 1);

  332.         server_cmd("exec %s/mega_shop.cfg", icfg)

  333.         server_exec();

  334. }

  335. public sv_msg(id) {

  336.         ColorChat(id, RED, "%L", id, "WELCOME_MSG");

  337. }

  338. ////////////////////////////////////////////////////////////////////////////////////////////////////

  339. // SET ALL FALSE ON CLIENT CONNECT/DISCONNECT

  340. ////////////////////////////////////////////////////////////////////////////////////////////////////

  341. public client_connect(id)

  342. {

  343.         g_UnAmmo[id] = false;

  344.         g_Gravity[id] = false;

  345.         g_HasBhop[id] = false;

  346.         g_Glow[id] = false

  347.         g_NoClip[id] = false

  348.         g_GodMode[id] = false

  349.         // Set oneRound  true

  350.         oneRound[id] = true

  351. }

  352. public client_disconnect(id)

  353. {

  354.         g_UnAmmo[id] = false;

  355.         g_Gravity[id] = false;

  356.         g_HasBhop[id] = false;

  357.         g_Alive[id] = false

  358.         g_Glow[id] = false

  359.         g_NoClip[id] = false

  360.         g_GodMode[id] = false

  361. }

  362. ////////////////////////////////////////////////////////////////////////////////////////////////////

  363. // UNLIMITED AMMO (GIVE AMMO)

  364. ////////////////////////////////////////////////////////////////////////////////////////////////////

  365. public give_ammo(id , wpnid , clip)

  366. {

  367.         if(!is_user_alive(id))

  368.                 return;

  369.  

  370.         if(     wpnid==CSW_C4           ||

  371.                 wpnid==CSW_KNIFE        ||

  372.                 wpnid==CSW_HEGRENADE    ||

  373.                 wpnid==CSW_SMOKEGRENADE ||

  374.                 wpnid==CSW_FLASHBANG    )

  375.                         return;

  376.  

  377.         if(!clip)

  378.         {

  379.                 static weapname[33];

  380.                 get_weaponname(wpnid , weapname , 32);

  381.  

  382.                 static wpn

  383.                 wpn = -1;

  384.                 while((wpn = find_ent_by_class(wpn , weapname)) != 0)

  385.                 {

  386.                         if(id == entity_get_edict(wpn , EV_ENT_owner))

  387.                         {

  388.                                 cs_set_weapon_ammo(wpn , maxclip(wpnid))

  389.                                 break;

  390.                         }

  391.                 }

  392.         }

  393. }

  394. // Check nades

  395. public check_for_nades(id)

  396. {

  397.         if(!is_user_alive(id))

  398.                 return;

  399.  

  400.         if(nade_flags() & HE_GRENADE)

  401.         {

  402.                 if(!user_has_weapon(id , CSW_HEGRENADE))

  403.                         give_item(id , "weapon_hegrenade");

  404.         }

  405.         if(nade_flags() & SMOKE_GRENADE)

  406.         {

  407.                 if(!user_has_weapon(id , CSW_SMOKEGRENADE))

  408.                         give_item(id , "weapon_smokegrenade");

  409.         }

  410.         if(nade_flags() & FLASH_GRENADE)

  411.         {

  412.                 if(!user_has_weapon(id , CSW_FLASHBANG))

  413.                         give_item(id , "weapon_flashbang");

  414.         }

  415. }

  416. ////////////////////////////////////////////////////////////////////////////////////////////////////

  417. // PLAYER DIE

  418. ////////////////////////////////////////////////////////////////////////////////////////////////////

  419. public fw_PlayerKilled(victim, attacker, shouldgib)

  420. {

  421.         // Victim has Gravity/Bhop/Unlimited Ammo

  422.         if(g_Gravity[victim] && g_HasBhop[victim] && g_UnAmmo[victim])

  423.         {

  424.                 g_Gravity[victim] = false

  425.                 g_HasBhop[victim] = false

  426.                 g_UnAmmo[victim] = false

  427.         }

  428.         // Victim has P.Weapon's

  429.         if(has_ak[victim] && has_awp[victim] && has_colt[victim])

  430.         {

  431.                 has_colt[victim] = false

  432.                 has_ak[victim] = false

  433.                 has_awp[victim] = false

  434.         }

  435. }      

  436. ////////////////////////////////////////////////////////////////////////////////////////////////////

  437. // MENU START!

  438. ////////////////////////////////////////////////////////////////////////////////////////////////////

  439. public ovomenu(id)

  440. {

  441.         new Buffer[32]

  442.         if(oneRound[id] == true) {

  443.                 if(get_pcvar_num(plugin_onoff) == 1) { 

  444.                         if(is_user_alive(id)) {

  445.                                 new menu = menu_create("Fö Menü:", "menu_handler");

  446.  

  447.                                 if(get_pcvar_num(weaponson) == 1) {

  448.                                         formatex(Buffer, 31, "%L", id, "MENU_ITEM_1", 0);

  449.                                         menu_additem(menu, Buffer, "1");

  450.                                 }

  451.                                 if(get_pcvar_num(extrason) == 1) {

  452.                                         formatex(Buffer, 31, "%L", id, "MENU_ITEM_2", 0);

  453.                                         menu_additem(menu, Buffer, "2");

  454.                                 }

  455.                                 if(get_pcvar_num(admmenuon) == 1 && get_user_flags(id) & ADMIN_CHAT) {

  456.                                         formatex(Buffer, 31, "\y[VIP]\rBolt", id, 0);

  457.                                         menu_additem(menu, Buffer, "3");

  458.                                 } else {

  459.                                         ColorChat(id, BLUE, "^4[MegaShop]^3 Megnyitottad a ^4Mega Bolt-ot.");

  460.                                 }

  461.                                 menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

  462.  

  463.                                 //Menu Display

  464.                                 menu_display(id, menu, 0);

  465.                         }

  466.                         else

  467.                         ColorChat(id, BLUE, "^4[MegaShop]^3 Csak élők vásárolhatnak.");

  468.                         return PLUGIN_HANDLED;

  469.                 }

  470.                 else

  471.                         ColorChat(id, BLUE, "^4[MegaShop]^3 Funkció kikapcsolva.");

  472.                 return PLUGIN_HANDLED;

  473.         } else

  474.                 ColorChat(id, BLUE, "^4[MegaShop]^3 %L.", id, "ONEPERROUND");

  475.         return PLUGIN_HANDLED;

  476. }

  477. // Show Weapon/Extras/Adm Menu

  478. public menu_handler(id, menu, item)

  479. {

  480.         if( item == MENU_EXIT )

  481.         {

  482.         menu_destroy(menu);

  483.         return PLUGIN_HANDLED;

  484.         }

  485.         new data[6], szName[64];

  486.         new access, callback;

  487.         menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

  488.         new key = str_to_num(data);

  489.  

  490.         switch(key)

  491.         {

  492.         case 1:

  493.         {

  494.                 menuweapon(id)

  495.         }

  496.         case 2:

  497.         {

  498.                 menuextra(id)

  499.         }

  500.         case 3:

  501.         {

  502.                 menuadm(id)

  503.         }

  504.         }

  505.         menu_destroy(menu);

  506.         return PLUGIN_HANDLED;

  507. }

  508. ////////////////////////////////////////////////////////////////////////////////////////////////////

  509. // WEAPON MENU

  510. ////////////////////////////////////////////////////////////////////////////////////////////////////

  511. public menuweapon(id)

  512. {

  513.         new Buffer[32]

  514.         if(get_pcvar_num(weaponson) == 1) {

  515.                 if(is_user_alive(id)) {

  516.         new menu = menu_create("E.Fegyver Menü:", "sec_menu_handler");

  517.  

  518.         if(get_pcvar_num(powerawp) == 1) {

  519.         formatex(Buffer, 31, "Erö AWP - (%d$)", get_pcvar_num(awpcost));

  520.         menu_additem(menu, Buffer, "1");

  521.         }

  522.         if(get_pcvar_num(powerak) == 1) {

  523.         formatex(Buffer, 31, "Erö AK47 - (%d$)", get_pcvar_num(akcost));

  524.         menu_additem(menu, Buffer, "2");

  525.         }

  526.         if(get_pcvar_num(powercolt) == 1) {

  527.         formatex(Buffer, 31, "Erö Colt-M4A1 - (%d$)", get_pcvar_num(coltcost));

  528.         menu_additem(menu, Buffer, "3");

  529.         }

  530.         menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

  531.         //Menu Display

  532.         menu_display(id, menu, 0);

  533.                 } else {

  534.         ColorChat(id, BLUE, "^4[MegaShop]^3 Csak élők vásárolhatnak.");

  535.         return PLUGIN_HANDLED;

  536.         }

  537.                 } else {

  538.         ColorChat(id, BLUE, "^4[MegaShop]^3 Funkció kikapcsolva.");

  539.         return PLUGIN_HANDLED;

  540.         }

  541.         return PLUGIN_CONTINUE;

  542. }

  543. // Weapon Menu function

  544. public sec_menu_handler(id, menu, item)

  545. {

  546.         if( item == MENU_EXIT )

  547.         {

  548.         menu_destroy(menu);

  549.         return PLUGIN_HANDLED;

  550.         }

  551.         new data[6], szName[64];

  552.         new access, callback;

  553.         menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

  554.         new key = str_to_num(data);

  555.  

  556.         switch(key)

  557.         {

  558.         case 1:

  559.         {

  560.                 if(get_pcvar_num(powercolt) == 0) {

  561.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 Tárgy kikapcsolva!");

  562.                 return PLUGIN_HANDLED;

  563.                 }

  564.                 new money = cs_get_user_money(id);

  565.                 new cost = get_pcvar_num(awpcost);

  566.  

  567.                 if(money > cost || money == cost) {

  568.                 cs_set_user_money(id, money - cost);

  569.  

  570.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L [1]^4 Erő Awp^3-t.", id, "BUY");

  571.                 has_awp[id] = true

  572.  

  573.                 give_item(id, "weapon_awp");

  574.  

  575.                 if(get_pcvar_num(one_round) == 1) {

  576.                         oneRound[id] = false;

  577.                 } else {

  578.                         oneRound[id] = true;

  579.                 }

  580.  

  581.                 new Weapon = get_user_weapon(id)

  582.  

  583.                 if(Weapon == CSW_AWP)

  584.                         entity_set_string(id, EV_SZ_viewmodel, "models/v_awp.mdl")

  585.                         } else  {

  586.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  587.                                 }

  588.         }

  589.         case 2:

  590.         {

  591.                 if(get_pcvar_num(powercolt) == 0)  {

  592.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 Tárgy kikapcsolva!");

  593.                 return PLUGIN_HANDLED;

  594.                 }

  595.                 new money = cs_get_user_money(id);

  596.                 new cost = get_pcvar_num(akcost);

  597.  

  598.                 if(money > cost || money == cost) {

  599.                 cs_set_user_money(id, money - cost);

  600.  

  601.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L [1]^4 Erő AK-47^3-et.", id, "BUY");

  602.                 has_ak[id] = true

  603.  

  604.                 give_item(id, "weapon_ak47");

  605.  

  606.                 if(get_pcvar_num(one_round) == 1) {

  607.                         oneRound[id] = false;

  608.                 } else {

  609.                         oneRound[id] = true;

  610.                 }

  611.  

  612.                 new Weapon = get_user_weapon(id)

  613.  

  614.                 if(Weapon == CSW_AK47)

  615.                         entity_set_string(id, EV_SZ_viewmodel, "models/v_ak47.mdl")

  616.                         } else  {

  617.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  618.                                 }      

  619.         }

  620.         case 3:

  621.         {

  622.                 if(get_pcvar_num(powercolt) == 0) {

  623.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 Tárgy kikapcsolva!");

  624.                 return PLUGIN_HANDLED;

  625.                 }

  626.                 new money = cs_get_user_money(id);

  627.                 new cost = get_pcvar_num(coltcost);

  628.  

  629.                 if(money > cost || money == cost) {

  630.                 cs_set_user_money(id, money - cost);

  631.  

  632.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L [1]^4 Erő M4A1^3-et.", id, "BUY");

  633.                 has_colt[id] = true

  634.  

  635.                 if(get_pcvar_num(one_round) == 1) {

  636.                         oneRound[id] = false;

  637.                 } else {

  638.                         oneRound[id] = true;

  639.                 }                      

  640.                 give_item(id, "weapon_m4a1");

  641.  

  642.                 new Weapon = get_user_weapon(id)

  643.  

  644.                 if(Weapon == CSW_M4A1)

  645.                         entity_set_string(id, EV_SZ_viewmodel, "models/v_m4a1.mdl")

  646.                         } else  {

  647.                 ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  648.                                 }              

  649.         }

  650.     }

  651.         menu_destroy(menu);

  652.         return PLUGIN_HANDLED;

  653. }

  654. ////////////////////////////////////////////////////////////////////////////////////////////////////

  655. // EXTRAS MENU

  656. ////////////////////////////////////////////////////////////////////////////////////////////////////

  657. public menuextra(id)

  658. {

  659.                 new Buffer[32]

  660.  

  661.                 if(get_pcvar_num(extrason) == 1) {

  662.                         if(is_user_alive(id)) {

  663.  

  664.                 new menu = menu_create("Extra Menü:", "trd_menu_handler");

  665.  

  666.                 if(get_pcvar_num(grav_onoff) == 1) {

  667.                 formatex(Buffer, 31, "%L\y(%d$)", id, "EXTRA_LOW_GRAV", get_pcvar_num(gravcost));

  668.                 menu_additem(menu, Buffer, "1");

  669.                 }

  670.                 if(get_pcvar_num(ammo_onoff) == 1) {

  671.                 formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_UNLI_AMMO", get_pcvar_num(ammocost));

  672.                 menu_additem(menu, Buffer, "2");

  673.                 }

  674.                 if(get_pcvar_num(bhop_onoff) == 1) {

  675.                 formatex(Buffer, 31, "BunnyHop - (%d$)", get_pcvar_num(bhopcost));

  676.                 menu_additem(menu, Buffer, "3");

  677.                 }

  678.                 if(get_pcvar_num(spec_onoff) == 1) {

  679.                 formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_SPEC_ARMOR", get_pcvar_num(speccost));

  680.                 menu_additem(menu, Buffer, "4");

  681.                 }

  682.                 if(get_pcvar_num(silent_onoff) == 1) {

  683.                 formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_SILENT_STEP", get_pcvar_num(silentcost));

  684.                 menu_additem(menu, Buffer, "5");

  685.                 }

  686.                 if(get_pcvar_num(glow_onoff) == 1) {

  687.                 formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_GLOW", get_pcvar_num(glowcost));

  688.                 menu_additem(menu, Buffer, "6");

  689.                 }

  690.                 menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

  691.  

  692.                 //Menu Display

  693.                 menu_display(id, menu, 0);

  694.  

  695.                         } else

  696.                         ColorChat(id, BLUE, "^4[MegaShop]^3 Csak elők vásárolhatnak.");

  697.                         return PLUGIN_HANDLED;

  698.  

  699.                 } else {

  700.                 ColorChat(id, BLUE, "^4[MegaShop]^3 Funkció kikapcsolva.");

  701.                 return PLUGIN_HANDLED;

  702.         }

  703.                 return PLUGIN_CONTINUE;

  704. }

  705. // Extra Menu Function

  706. public trd_menu_handler(id, menu, item)

  707. {

  708.         if( item == MENU_EXIT )

  709.         {

  710.         menu_destroy(menu);

  711.         return PLUGIN_HANDLED;

  712.         }

  713.         new data[6], szName[64];

  714.         new access, callback;

  715.         menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

  716.         new key = str_to_num(data);

  717.  

  718.         switch(key)

  719.         {

  720.         case 1:

  721.         {

  722.                 if(get_pcvar_num(grav_onoff) == 0) {

  723.                 ColorChat(id, BLUE, "^4[Extra]^3 Tárgy kikapcsolva!");

  724.                 return PLUGIN_HANDLED;

  725.                 }

  726.                 new money = cs_get_user_money(id);

  727.                 new cost = get_pcvar_num(gravcost);

  728.  

  729.                 if(money > cost || money == cost) {

  730.                 cs_set_user_money(id, money - cost);

  731.                 ColorChat(id, BLUE, "^4[Extra]^3 Alacsony Gravitaciót ^4%L!", id, "BUY");

  732.                 g_Gravity[id] = true;

  733.  

  734.                 if(get_pcvar_num(one_round) == 1) {

  735.                         oneRound[id] = false;

  736.                 } else {

  737.                         oneRound[id] = true;

  738.                 }

  739.  

  740.                 set_user_gravity(id, get_pcvar_float(gravityam));

  741.                 } else {

  742.                         ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");               

  743.                 }

  744.         }

  745.         case 2:

  746.         {

  747.                 if(get_pcvar_num(ammo_onoff) == 0){

  748.                 ColorChat(id, BLUE, "^4[Extra]^3 Tárgy Kikapcsolva!");

  749.                 return PLUGIN_HANDLED;

  750.                 }

  751.                 new money = cs_get_user_money(id);

  752.                 new cost = get_pcvar_num(ammocost);

  753.  

  754.                 if(money > cost || money == cost) {

  755.                 cs_set_user_money(id, money - cost);

  756.                 ColorChat(id, BLUE, "^4[Extra]^3 Végtelen töltényt ^4%L!", id, "BUY");

  757.                 g_UnAmmo[id] = true;

  758.  

  759.                 if(get_pcvar_num(one_round) == 1) {

  760.                         oneRound[id] = false;

  761.                 } else {

  762.                         oneRound[id] = true;

  763.                 }

  764.  

  765.                 } else {

  766.                         ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");       

  767.                 }

  768.         }

  769.         case 3:

  770.         {

  771.                 if(get_pcvar_num(bhop_onoff) == 0){

  772.                 ColorChat(id, BLUE, "^4[Extra]^3 Tárgy Kikapcsolva!");

  773.                 return PLUGIN_HANDLED;

  774.                 }

  775.                 new money = cs_get_user_money(id);

  776.                 new cost = get_pcvar_num(bhopcost);

  777.  

  778.                 if(money > cost || money == cost) {

  779.                 cs_set_user_money(id, money - cost);

  780.                 ColorChat(id, BLUE, "^4[Extra]^3 Bhop-ot ^4%L!", id, "BUY");

  781.                 g_HasBhop[id] = true;

  782.  

  783.                 if(get_pcvar_num(one_round) == 1) {

  784.                         oneRound[id] = false;

  785.                 } else {

  786.                         oneRound[id] = true;

  787.                 }

  788.  

  789.                 } else {

  790.                         ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  791.                 }              

  792.         }

  793.         case 4:

  794.         {

  795.                 if(get_pcvar_num(spec_onoff) == 0){

  796.                 ColorChat(id, BLUE, "^4[Extra]^3 Tárgy Kikapcsolva!");

  797.                 return PLUGIN_HANDLED;

  798.                 }

  799.                 new money = cs_get_user_money(id);

  800.                 new cost = get_pcvar_num(speccost);

  801.  

  802.                 if(money > cost || money == cost) {

  803.                 cs_set_user_money(id, money - cost);

  804.                 ColorChat(id, BLUE, "^4[Extra]^3 Speciális Felszerelés-t ^4%L!", id, "BUY");

  805.                 g_Gravity[id] = true;

  806.  

  807.                 if(get_pcvar_num(one_round) == 1) {

  808.                         oneRound[id] = false;

  809.                 } else {

  810.                         oneRound[id] = true;

  811.                 }

  812.  

  813.                 set_user_maxspeed(id, get_pcvar_float(specspeed));

  814.                 set_user_health(id, get_pcvar_num(speclife));

  815.                 set_user_gravity(id, get_pcvar_float(specgrav));

  816.                 } else {

  817.                         ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  818.  

  819.                 }

  820.         }

  821.         case 5:

  822.         {

  823.                 if(get_pcvar_num(silent_onoff) == 0){

  824.                 ColorChat(id, BLUE, "^4[Extra]^3 Tárgy Kikapcsolva!");

  825.                 return PLUGIN_HANDLED;

  826.                 }

  827.                 new money = cs_get_user_money(id);

  828.                 new cost = get_pcvar_num(silentcost);

  829.  

  830.                 if(money > cost || money == cost) {

  831.                 cs_set_user_money(id, money - cost);

  832.                 ColorChat(id, BLUE, "^4[Extra]^3 Halk Járás-t ^4 %L!", id, "BUY");

  833.                 g_SilentF[id] = true;

  834.  

  835.                 if(get_pcvar_num(one_round) == 1) {

  836.                         oneRound[id] = false;

  837.                 } else {

  838.                         oneRound[id] = true;

  839.                 }

  840.  

  841.                 set_user_footsteps(id, 1)

  842.                 } else {

  843.                         ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  844.                 }

  845.         }

  846.         case 6:

  847.         {

  848.                 if(get_pcvar_num(glow_onoff) == 0){

  849.                 ColorChat(id, BLUE, "^4[Extra]^3 Tárgy Kikapcsolva!");

  850.                 return PLUGIN_HANDLED;

  851.                 }

  852.                 new money = cs_get_user_money(id);

  853.                 new cost = get_pcvar_num(glowcost);

  854.  

  855.                 if(money > cost || money == cost) {

  856.                 cs_set_user_money(id, money - cost);

  857.  

  858.                 new col1 = random_num(0, 255)

  859.                 new col2 = random_num(0, 255)

  860.                 new col3 = random_num(0, 255)

  861.  

  862.                 ColorChat(id, BLUE, "^4[Extra]^3 Aurá-t ^4 %L!", id, "BUY");

  863.                 g_Glow[id] = true;

  864.  

  865.                 if(get_pcvar_num(one_round) == 1) {

  866.                         oneRound[id] = false;

  867.                 } else {

  868.                         oneRound[id] = true;

  869.                 }

  870.  

  871.                 set_user_rendering(id, kRenderFxGlowShell, col1, col2, col3, kRenderNormal, 25)

  872.                 } else {

  873.                         ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  874.                 }

  875.         }

  876.  

  877.     }

  878.         menu_destroy(menu);

  879.         return PLUGIN_HANDLED;

  880. }

  881. ////////////////////////////////////////////////////////////////////////////////////////////////////

  882. // ADMIN MENU

  883. ////////////////////////////////////////////////////////////////////////////////////////////////////

  884. public menuadm(id)

  885. {

  886.         new Buffer[32]

  887.         if(get_pcvar_num(weaponson) == 1) {

  888.                 if(is_user_alive(id)) {

  889.                         new menu = menu_create("VIP Menü:", "adm_menu_handler");

  890.  

  891.                         if(get_pcvar_num(noclip_onoff) == 1) {

  892.                         formatex(Buffer, 31, "%L [%d Sec] - (%d$)", id, "VIP_NOCLIP", get_pcvar_num(nocliptime), get_pcvar_num(noclipcost));

  893.                         menu_additem(menu, Buffer, "1");

  894.                         }

  895.                         if(get_pcvar_num(gmode_onoff) == 1) {

  896.                         formatex(Buffer, 31, "%L [%d Sec] - (%d$)", id, "VIP_GODMOD", get_pcvar_num(gmodetime), get_pcvar_num(gmodecost));

  897.                         menu_additem(menu, Buffer, "2");

  898.                         }

  899.                         if(get_pcvar_num(money_onoff) == 1) {

  900.                         formatex(Buffer, 31, "\r+ \w16000$", 0);

  901.                         menu_additem(menu, Buffer, "3");

  902.                         }

  903.                         menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

  904.  

  905.                         //Menu Display

  906.                         menu_display(id, menu, 0);

  907.  

  908.                 } else

  909.                         ColorChat(id, BLUE, "^4[MegaShop]^3 Csak élők vásárolhatnak.");

  910.                 return PLUGIN_HANDLED;

  911.         } else {

  912.                 ColorChat(id, BLUE, "^4[MegaShop]^3 Funkció kikapcsolva.");

  913.                 return PLUGIN_HANDLED;

  914.         }

  915.         return PLUGIN_CONTINUE;

  916. }

  917. // Admin Menu Function

  918. public adm_menu_handler(id, menu, item)

  919. {

  920.         if( item == MENU_EXIT )

  921.         {

  922.         menu_destroy(menu);

  923.         return PLUGIN_HANDLED;

  924.         }

  925.         new data[6], szName[64];

  926.         new access, callback;

  927.         menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

  928.         new key = str_to_num(data);

  929.  

  930.         switch(key)

  931.         {

  932.         case 1:

  933.         {

  934.                 if(get_pcvar_num(noclip_onoff) == 0) {

  935.                 ColorChat(id, BLUE, "^4[VIP Menü]^3 Tárgy Kikapcsolva!");

  936.                 return PLUGIN_HANDLED;

  937.                 }

  938.                 new money = cs_get_user_money(id);

  939.                 new cost = get_pcvar_num(noclipcost);

  940.  

  941.                 if(money > cost || money == cost) {

  942.                 cs_set_user_money(id, money - cost);

  943.  

  944.                 ColorChat(id, BLUE, "^4[VIP Menü]^3 Falon Átjárás-t ^4 %L.", id, "BUY");

  945.                 g_NoClip[id] = true;

  946.  

  947.                 if(get_pcvar_num(one_round) == 1) {

  948.                         oneRound[id] = false;

  949.                 } else {

  950.                         oneRound[id] = true;

  951.                 }

  952.  

  953.                 set_user_noclip(id, 1)

  954.                 set_task(get_pcvar_float(nocliptime), "remove_noclip", id);

  955.  

  956.                         } else {

  957.                         ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  958.                         }

  959.         }

  960.         case 2:

  961.         {

  962.                 if(get_pcvar_num(gmode_onoff) == 0)  {

  963.                 ColorChat(id, BLUE, "^4[VIP Menü]^3 Tárgy Kikapcsolva!");

  964.                 return PLUGIN_HANDLED;

  965.                 }

  966.                 new money = cs_get_user_money(id);

  967.                 new cost = get_pcvar_num(gmodecost);

  968.  

  969.                 if(money > cost || money == cost) {

  970.                 cs_set_user_money(id, money - cost);

  971.  

  972.                 ColorChat(id, BLUE, "^4[VIP Menü]^3 Isten Mod-ot ^4 %L.", id, "BUY");

  973.                 g_GodMode[id] = true

  974.  

  975.                 if(get_pcvar_num(one_round) == 1) {

  976.                         oneRound[id] = false;

  977.                 } else {

  978.                         oneRound[id] = true;

  979.                 }

  980.  

  981.                 set_user_godmode(id,1)

  982.                 set_task(get_pcvar_float(gmodetime), "remove_gmode", id);

  983.  

  984.                         } else {

  985.                         ColorChat(id, BLUE, "^4[E.Fegyver]^3 %L.", id, "MONEY");

  986.                         }      

  987.         }

  988.         case 3:

  989.         {

  990.                 if(get_pcvar_num(money_onoff) == 0) {

  991.                 ColorChat(id, BLUE, "^4[VIP Menü]^3 Tárgy Kikapcsolva!");

  992.                 return PLUGIN_HANDLED;

  993.                 }      

  994.  

  995.                 ColorChat(id, BLUE, "^4[VIP Menü]^3 16000$-t kaptál.");      

  996.                 cs_set_user_money(id, 16000);

  997.  

  998.                 if(get_pcvar_num(one_round) == 1) {

  999.                         oneRound[id] = false;

  1000.                 } else {

  1001.                         oneRound[id] = true;

  1002.                 }

  1003.  

  1004.                 }      

  1005.         }

  1006.         menu_destroy(menu);

  1007.         return PLUGIN_HANDLED;

  1008. }      

  1009. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1010. // Remove GodMode/Noclip

  1011. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1012. // Remove Gmode (TIME)

  1013. public remove_gmode(id) {

  1014.         g_GodMode[id] = false;

  1015.         ColorChat(id, BLUE, "^4[MegaShop]^3 Lejárt az ^4'Isten Mod'^3-od!")

  1016.         set_user_godmode(id,0)

  1017. }

  1018. // Remove Noclip (TIME)

  1019. public remove_noclip(id) {

  1020.         g_NoClip[id] = false;

  1021.         ColorChat(id, BLUE, "^4[MegaShop]^3 Lejárt a ^4'Falon Átjárás'^3-od!")

  1022.         set_user_noclip(id, 0)

  1023.         ClientCommand_UnStick(id)

  1024. }

  1025.  

  1026. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1027. // BunnyHOP

  1028. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1029. public CmdStart(id, uc_handle, seed) {

  1030.  

  1031.         if(     is_user_alive(id)

  1032.         &&      g_HasBhop[id]

  1033.         &&      get_uc(uc_handle, UC_Buttons) & IN_USE

  1034.         &&      pev(id, pev_flags) & FL_ONGROUND        ) {

  1035.                 static Float:fVelocity[3]

  1036.                 pev(id, pev_velocity, fVelocity)

  1037.                 fVelocity[0] *= 0.3

  1038.                 fVelocity[1] *= 0.3

  1039.                 fVelocity[2] *= 0.3

  1040.                 set_pev(id, pev_velocity, fVelocity)

  1041.         }

  1042. }

  1043.  

  1044. public Player_Jump(id) {

  1045.  

  1046.         if( !is_user_alive(id) ) {

  1047.                 return

  1048.         }

  1049.  

  1050.         if( g_iCdWaterJumpTime[id] ) {

  1051.                 return

  1052.         }

  1053.  

  1054.         if( pev(id, pev_waterlevel) >= 2 ){

  1055.                 return

  1056.         }

  1057.  

  1058.         static iFlags ; iFlags = pev(id, pev_flags)

  1059.         if( !(iFlags & FL_ONGROUND) ){

  1060.                 return

  1061.         }

  1062.  

  1063.         static iOldButtons ; iOldButtons = pev(id, pev_oldbuttons)

  1064.         if( !g_HasBhop[id] && iOldButtons & IN_JUMP ){

  1065.                 return

  1066.         }

  1067.  

  1068.         set_pev(id, pev_oldbuttons, iOldButtons | IN_JUMP)

  1069.  

  1070.         static Float:fVelocity[3]

  1071.         pev(id, pev_velocity, fVelocity)

  1072.  

  1073.         static Float:fFrameTime, Float:fPlayerGravity

  1074.         global_get(glb_frametime, fFrameTime)

  1075.         pev(id, pev_gravity, fPlayerGravity)

  1076.  

  1077.         new iLJ

  1078.         if(     (pev(id, pev_bInDuck) || iFlags & FL_DUCKING)

  1079.         &&      get_pdata_int(id, 356)

  1080.         &&      pev(id, pev_button) & IN_DUCK

  1081.         &&      pev(id, pev_flDuckTime) ){

  1082.                 static Float:fPunchAngle[3], Float:fForward[3]

  1083.                 pev(id, pev_punchangle, fPunchAngle)

  1084.                 fPunchAngle[0] = -5.0

  1085.                 set_pev(id, pev_punchangle, fPunchAngle)

  1086.                 global_get(glb_v_forward, fForward)

  1087.  

  1088.                 fVelocity[0] = fForward[0] * 560

  1089.                 fVelocity[1] = fForward[1] * 560

  1090.                 fVelocity[2] = 299.33259094191531084669989858532

  1091.                 iLJ = 1

  1092.         }

  1093.         else

  1094.         {

  1095.                 fVelocity[2] = 268.32815729997476356910084024775

  1096.         }

  1097.  

  1098.         fVelocity[2] -= fPlayerGravity * fFrameTime * 0.5 * 800

  1099.  

  1100.         set_pev(id, pev_velocity, fVelocity)

  1101.  

  1102.         set_pev(id, pev_gaitsequence, 6+iLJ)

  1103.         set_pev(id, pev_frame, 0.0)

  1104. }

  1105. public UpdateClientData(id, sendweapons, cd_handle)

  1106. {

  1107.         g_iCdWaterJumpTime[id] = get_cd(cd_handle, CD_WaterJumpTime)

  1108. }

  1109. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1110. // POWER WEAPONS

  1111. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1112. public event_damage( id ) {

  1113.  

  1114.         new victim_id = id;

  1115.         if( !is_user_connected( victim_id ) ) return PLUGIN_CONTINUE

  1116.         new dmg_take = read_data( 2 );

  1117.         new dmgtype = read_data( 3 );

  1118.         new Float:damage = dmg_take * get_pcvar_float(pweapdmgmulti);

  1119.         new health = get_user_health( victim_id );

  1120.         new frag = get_user_frags(id);

  1121.  

  1122.         new iWeapID, attacker_id = get_user_attacker( victim_id, iWeapID );

  1123.  

  1124.         if( !is_user_connected( attacker_id ) || !is_user_alive( victim_id ) ) {

  1125.                 return PLUGIN_HANDLED

  1126.         }

  1127.         // AWP DMG

  1128.         if( iWeapID == CSW_AWP && has_awp[attacker_id] ) {

  1129.  

  1130.                 if( floatround(damage) >= health ) {

  1131.                         if( victim_id == attacker_id ) {

  1132.                                 return PLUGIN_CONTINUE

  1133.                                 }else{

  1134.                                 log_kill( attacker_id, victim_id, "awp", 0 );

  1135.                         }

  1136.  

  1137.                         return PLUGIN_CONTINUE

  1138.                         }else {

  1139.                         if( victim_id == attacker_id ) return PLUGIN_CONTINUE

  1140.  

  1141.                         fakedamage( victim_id, "weapon_awp", damage, dmgtype );

  1142.                         set_user_frags(id, frag++)

  1143.                 }

  1144.         }

  1145.         // AK47 DMG

  1146.         if( iWeapID == CSW_AK47 && has_ak[attacker_id] ) {

  1147.  

  1148.                 if( floatround(damage) >= health ) {

  1149.                         if( victim_id == attacker_id ) {

  1150.                                 return PLUGIN_CONTINUE

  1151.                                 }else{

  1152.                                 log_kill( attacker_id, victim_id, "ak47", 0 );

  1153.                         }

  1154.  

  1155.                         return PLUGIN_CONTINUE

  1156.                         }else {

  1157.                         if( victim_id == attacker_id ) return PLUGIN_CONTINUE

  1158.  

  1159.                         fakedamage( victim_id, "weapon_ak47", damage, dmgtype);

  1160.                         set_user_frags(id, frag++)

  1161.                 }

  1162.         }

  1163.         // COLT DMG

  1164.         if(iWeapID == CSW_M4A1 && has_colt[attacker_id])

  1165.         {

  1166.                 if( floatround(damage) >= health ) {

  1167.                         if( victim_id == attacker_id ) {

  1168.                                 return PLUGIN_CONTINUE

  1169.                                 }else{

  1170.                                 log_kill( attacker_id, victim_id, "m4a1", 0 );

  1171.                         }

  1172.                         return PLUGIN_CONTINUE

  1173.                         }else {

  1174.                         if( victim_id == attacker_id ) return PLUGIN_CONTINUE

  1175.                         fakedamage( victim_id, "weapon_m4a1", damage, dmgtype);

  1176.                         set_user_frags(id, frag++)

  1177.                 }

  1178.         }

  1179.         return PLUGIN_CONTINUE

  1180. }              

  1181. // Normal Weapon Model (P.Weapon)

  1182. public CurWeapon(id)

  1183. {              

  1184.         // AWP

  1185.         if(get_pcvar_num(powerawp)) {

  1186.  

  1187.                 new Weapon = read_data(2)

  1188.  

  1189.                 if(Weapon == CSW_AWP && has_awp[id])

  1190.                         entity_set_string(id, EV_SZ_viewmodel, "models/v_awp.mdl")

  1191.  

  1192.         }

  1193.         // AK47

  1194.         if(get_pcvar_num(powerak)) {

  1195.  

  1196.                 new Weapon = read_data(2)

  1197.  

  1198.                 if(Weapon == CSW_AK47 && has_ak[id])

  1199.                         entity_set_string(id, EV_SZ_viewmodel, "models/v_ak47.mdl")

  1200.  

  1201.         }

  1202.         // Colt-m4a1

  1203.         if(get_pcvar_num(powercolt)) {

  1204.  

  1205.                 new Weapon = read_data(2)

  1206.  

  1207.                 if(Weapon == CSW_M4A1 && has_colt[id])

  1208.                         entity_set_string(id, EV_SZ_viewmodel, "models/v_m4a1.mdl")

  1209.  

  1210.         }

  1211.  

  1212. }

  1213. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1214. // DISABLE ALL ITEMS

  1215. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1216. public disableall(id) {

  1217.  

  1218.         if(g_HasBhop[id]) {

  1219.                 ColorChat(id, BLUE, "^4[MegaShop]^3 A ^4'Bhop'^3-od kikapcsolva!")

  1220.                 g_HasBhop[id] = false;

  1221.         }

  1222.         if(g_UnAmmo[id]) {

  1223.                 ColorChat(id, BLUE, "^4[MegaShop]^3 A ^4'Végtelen Töltény Mod'^3-od kikapcsolva!")

  1224.                 g_UnAmmo[id] = false;

  1225.  

  1226.         }

  1227.         if(g_SilentF[id]) {

  1228.                 ColorChat(id, BLUE, "^4[MegaShop]^3 A 'Halk Járás'^4-od Kikapcsolva!")

  1229.                 g_SilentF[id] = false;

  1230.                 set_user_footsteps(id, 0)

  1231.  

  1232.         }

  1233.         if(g_Glow[id]) {

  1234.                 ColorChat(id, BLUE, "^4[MegaShop]^3 Az 'Aurád' ^4Kikapcsolva!")

  1235.                 g_Glow[id] = false;

  1236.                 set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 0)

  1237.  

  1238.         }

  1239.         if(g_GodMode[id]) {

  1240.                 ColorChat(id, BLUE, "^4[MegaShop]^3 Az 'Isten Mod'^4-od Kikapcsolva!")

  1241.                 g_GodMode[id] = false

  1242.                 set_user_godmode(id,0)

  1243.         }

  1244.         if(g_NoClip[id]) {

  1245.                 ColorChat(id, BLUE, "^4[MegaShop]^3 A 'Falon Átjárás'^4-od Kikapcsolva!")

  1246.                 g_NoClip[id] = false

  1247.                 set_user_noclip(id,0)

  1248.         }

  1249.         if(get_pcvar_num(plugin_onoff) == 1) {

  1250.                 oneRound[id] = true

  1251.         }

  1252. }

  1253. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1254. // UNSTUCK (NOCLIP) - Sorry if the code is not my friend, but I got the code from my friend.

  1255. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1256. public ClientCommand_UnStick ( const id ) {

  1257.  

  1258.         new i_Value;

  1259.  

  1260.         if ( ( i_Value = UTIL_UnstickPlayer ( id, 32, 128 ) ) != 1 )

  1261.         {

  1262.                 switch ( i_Value )

  1263.                 {

  1264.                         case 0  : client_print ( id, print_chat, "Nem vagy beragadva!" );

  1265.                                 case -1 : client_print ( id, print_console, "..." );

  1266.                         }

  1267.         }

  1268.  

  1269.         return PLUGIN_CONTINUE;

  1270. }

  1271.  

  1272.  

  1273. UTIL_UnstickPlayer ( const id, const i_StartDistance, const i_MaxAttempts ) {

  1274.         // --| Not alive, ignore.

  1275.         if ( !is_user_alive ( id ) )  return -1

  1276.  

  1277.         static Float:vf_OriginalOrigin[ Coord_e ], Float:vf_NewOrigin[ Coord_e ];

  1278.         static i_Attempts, i_Distance;

  1279.  

  1280.         // --| Get the current player's origin.

  1281.         pev ( id, pev_origin, vf_OriginalOrigin );

  1282.  

  1283.         i_Distance = i_StartDistance;

  1284.  

  1285.         while ( i_Distance < 1000 )

  1286.         {

  1287.                 i_Attempts = i_MaxAttempts;

  1288.  

  1289.                 while ( i_Attempts-- )

  1290.                 {

  1291.                         vf_NewOrigin[ x ] = random_float ( vf_OriginalOrigin[ x ] - i_Distance, vf_OriginalOrigin[ x ] + i_Distance );

  1292.                         vf_NewOrigin[ y ] = random_float ( vf_OriginalOrigin[ y ] - i_Distance, vf_OriginalOrigin[ y ] + i_Distance );

  1293.                         vf_NewOrigin[ z ] = random_float ( vf_OriginalOrigin[ z ] - i_Distance, vf_OriginalOrigin[ z ] + i_Distance );

  1294.  

  1295.                         engfunc ( EngFunc_TraceHull, vf_NewOrigin, vf_NewOrigin, DONT_IGNORE_MONSTERS, GetPlayerHullSize ( id ), id, 0 );

  1296.  

  1297.                         // --| Free space found.

  1298.                         if ( get_tr2 ( 0, TR_InOpen ) && !get_tr2 ( 0, TR_AllSolid ) && !get_tr2 ( 0, TR_StartSolid ) )

  1299.                         {

  1300.                                 // --| Set the new origin .

  1301.                                 engfunc ( EngFunc_SetOrigin, id, vf_NewOrigin );

  1302.                                 return 1;

  1303.                         }

  1304.                 }

  1305.  

  1306.                 i_Distance += i_StartDistance;

  1307.         }

  1308.  

  1309.         // --| Could not be found.

  1310.         return 0;

  1311. }

  1312. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1313. // COLOR CHAT

  1314. ////////////////////////////////////////////////////////////////////////////////////////////////////

  1315. public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)

  1316. {

  1317.         static message[256];

  1318.  

  1319.         switch(type)

  1320.         {

  1321.                 case YELLOW: // Yellow

  1322.                 {

  1323.                         message[0] = 0x01;

  1324.                 }

  1325.                 case GREEN: // Green

  1326.                 {

  1327.                         message[0] = 0x04;

  1328.                 }

  1329.                 default: // White, Red, Blue

  1330.                 {

  1331.                         message[0] = 0x03;

  1332.                 }

  1333.         }

  1334.  

  1335.         vformat(message[1], 251, msg, 4);

  1336.  

  1337.         // Make sure message is not longer than 192 character. Will crash the server.

  1338.         message[192] = '^0';

  1339.  

  1340.         new team, ColorChange, index, MSG_Type;

  1341.  

  1342.         if(!id)

  1343.         {

  1344.                 index = FindPlayer();

  1345.                 MSG_Type = MSG_ALL;

  1346.  

  1347.         } else {

  1348.                 MSG_Type = MSG_ONE;

  1349.                 index = id;

  1350.         }

  1351.  

  1352.         team = get_user_team(index);   

  1353.         ColorChange = ColorSelection(index, MSG_Type, type);

  1354.  

  1355.         ShowColorMessage(index, MSG_Type, message);

  1356.  

  1357.         if(ColorChange)

  1358.         {

  1359.                 Team_Info(index, MSG_Type, TeamName[team]);

  1360.         }

  1361. }

  1362.  

  1363. ShowColorMessage(id, type, message[])

  1364. {

  1365.         message_begin(type, SayText, _, id);

  1366.         write_byte(id)         

  1367.         write_string(message);

  1368.         message_end()

  1369. }

  1370.  

  1371. Team_Info(id, type, team[])

  1372. {

  1373.         message_begin(type, TeamInfo, _, id);

  1374.         write_byte(id);

  1375.         write_string(team);

  1376.         message_end();

  1377.  

  1378.         return 1;

  1379. }

  1380.  

  1381. ColorSelection(index, type, Color:Type)

  1382. {

  1383.         switch(Type)

  1384.         {

  1385.                 case RED:

  1386.                 {

  1387.                         return Team_Info(index, type, TeamName[1]);

  1388.                 }

  1389.                 case BLUE:

  1390.                 {

  1391.                         return Team_Info(index, type, TeamName[2]);

  1392.                 }

  1393.                 case GREY:

  1394.                 {

  1395.                         return Team_Info(index, type, TeamName[0]);

  1396.                 }

  1397.         }

  1398.  

  1399.         return 0;

  1400. }

  1401.  

  1402. FindPlayer()

  1403. {

  1404.         new i = -1;

  1405.  

  1406.         while(i <= MaxSlots)

  1407.         {

  1408.                 if(IsConnected[++i])

  1409.                 {

  1410.                         return i;

  1411.                 }

  1412.         }

  1413.  

  1414.         return -1;

  1415. }

  1416. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE

  1417. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }

  1418. */

  1419.  


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: megashop
HozzászólásElküldve:2012.07.28. 12:28 
Offline
Tiszteletbeli
Avatar

Csatlakozott:2011.09.18. 13:01
Hozzászólások:4274
Megköszönt másnak: 55 alkalommal
Megköszönték neki: 515 alkalommal
Igen meglehet.

_________________
Idk. Csak ugy funbooo.
Kép


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése: Rendezés 
Új téma nyitása Hozzászólás a témához  [2 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 30 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole