[Cerere] Plugin Shop JB
Categoria cu cereri de pluginuri si nu numai.
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
Forum rules
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
-
- Membru, skill 0
- Posts: 18
- Joined: 11 Apr 2013, 19:36
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Contact:
- oneeightone
- Fost moderator
- Posts: 2547
- Joined: 17 Jul 2009, 19:29
- Detinator Steam: Da
- Reputatie: Fost super moderator
Membru Club eXtreamCS (o luna)
Nick anterior : LiGHTERS
0.3 / 3 - Has thanked: 68 times
- Been thanked: 521 times
- .sma | Afiseaza codul
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <engine> #include <cstrike> #include <fun> #include <hamsandwich> #include <fakemeta> #define PLUGIN "Extra-shop" #define VERSION "1.0" #define AUTHOR "ITouch" new keysmenu = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) new T_item_1, T_item_2, T_item_3, T_item_4, T_item_5, T_item_6, T_item_7, T_item_8, CT_item_1, CT_item_2, CT_item_3 new bool:g_CrowBar[33], g_Chain[33], g_Electro[33], g_speed[33], g_HasWeapon[33] new Round[33] new g_msgSayText new const g_chain_weaponmodel[] = { "models/extreme-shop/p_moto.mdl" } new const g_chain_viewmodel[] = { "models/extreme-shop/v_moto.mdl" } new const g_crow_weaponmodel[] = { "models/extreme-shop/p_palo.mdl" } new const g_crow_viewmodel[] = { "models/extreme-shop/v_palo.mdl" } new const g_electro_weaponmodel[] = { "models/extreme-shop/p_electro.mdl" } new const g_electro_viewmodel[] = { "models/extreme-shop/v_electro.mdl" } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam(Ham_Spawn, "player", "Spawn_player", 1) RegisterHam(Ham_TakeDamage, "player", "TakeDamage") register_menu("MenuT", keysmenu, "ShopT") register_menu("MenuCT", keysmenu, "ShopCT") T_item_1 = register_cvar("jbe_crowbarcost", "5000") T_item_2 = register_cvar("jbe_chaincost", "10000") T_item_3 = register_cvar("jbe_electrocost", "12000") T_item_4 = register_cvar("jbe_speedcost", "16000") T_item_5 = register_cvar("jbe_grenadecost", "5000") T_item_6 = register_cvar("jbe_invisecostT", "16000") T_item_7 = register_cvar("jbe_gravitycost", "16000") T_item_8 = register_cvar("jbe_glockcost", "16000") CT_item_1 = register_cvar("jbe_electrocostCT", "6000") CT_item_2 = register_cvar("jbe_invisecostCT", "16000") CT_item_3 = register_cvar("jbe_extracost", "16000") register_logevent("round_start", 2, "0=World triggered", "1=Round_Start") register_event( "CurWeapon", "WeaponChange", "be", "1=1" ) register_forward(FM_EmitSound, "fw_EmitSound") register_clcmd("say /magazin", "clcmd_shop") g_msgSayText = get_user_msgid("SayText") } public plugin_precache() { precache_model( "models/extreme-shop/p_moto.mdl" ) precache_model( "models/extreme-shop/v_moto.mdl" ) precache_model( "models/extreme-shop/p_electro.mdl" ) precache_model( "models/extreme-shop/v_electro.mdl" ) precache_model( "models/extreme-shop/p_palo.mdl" ) precache_model( "models/extreme-shop/v_palo.mdl" ) precache_sound( "extreme-shop/MTSlash.wav" ) precache_sound( "extreme-shop/MTConvoca.wav" ) precache_sound( "extreme-shop/MTHitWall.wav" ) precache_sound( "extreme-shop/MTHit2.wav" ) precache_sound( "extreme-shop/MTStab.wav" ) precache_sound( "extreme-shop/ESlash.wav" ) precache_sound( "extreme-shop/EConvoca.wav" ) precache_sound( "extreme-shop/EHitWall.wav" ) precache_sound( "extreme-shop/EHit2.wav" ) precache_sound( "extreme-shop/EStab.wav" ) } public WeaponChange(id) { if(g_speed[id]) set_user_maxspeed(id, 320.0) if (read_data(1) != 1) return static weapon; weapon = read_data(2); if (weapon == CSW_KNIFE && g_Chain[id]) { set_pev(id, pev_viewmodel2, g_chain_viewmodel) set_pev(id, pev_weaponmodel2, g_chain_weaponmodel) } if (weapon == CSW_KNIFE && g_CrowBar[id]) { set_pev(id, pev_viewmodel2, g_crow_viewmodel) set_pev(id, pev_weaponmodel2, g_crow_weaponmodel) } if (weapon == CSW_KNIFE && g_Electro[id]) { set_pev(id, pev_viewmodel2, g_electro_viewmodel) set_pev(id, pev_weaponmodel2, g_electro_weaponmodel) } } public TakeDamage(victim, inflictor, attacker, Float:damage, damage_type) { if (victim == attacker || !is_user_connected(attacker)) return HAM_IGNORED; if (get_user_weapon(attacker) == CSW_KNIFE && !IsGrenade(inflictor) && g_Chain[attacker]) { SetHamParamFloat(4, 500) } if (get_user_weapon(attacker) == CSW_KNIFE && !IsGrenade(inflictor) && g_Electro[attacker]) { SetHamParamFloat(4, 80) } if (get_user_weapon(attacker) == CSW_KNIFE && !IsGrenade(inflictor) && g_CrowBar[attacker] && get_user_team(attacker) != get_user_team(victim)) { SetHamParamFloat(4, 50) } if (get_user_team(victim) == get_user_team(attacker) && IsGrenade(inflictor)) { return HAM_SUPERCEDE } return HAM_IGNORED } public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch) { if (!is_user_connected(id)) return FMRES_IGNORED; if (g_Chain[id] && equal(sample[8], "kni", 3)) { volume = 0.6; if (equal(sample[14], "sla", 3)) { engfunc(EngFunc_EmitSound, id, channel, "extreme-shop/MTSlash.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } if(equal(sample,"weapons/knife_deploy1.wav")) { engfunc(EngFunc_EmitSound, id, channel, "extreme-shop/MTConvoca.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } if (equal(sample[14], "hit", 3)) { if (sample[17] == 'w') { engfunc(EngFunc_EmitSound, id, channel,"extreme-shop/MTHitWall.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } else { engfunc(EngFunc_EmitSound, id, channel, "extreme-shop/MTHit2.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } } if (equal(sample[14], "sta", 3)) { engfunc(EngFunc_EmitSound, id, channel, "extreme-shop/MTStab.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } } if (g_Electro[id] && equal(sample[8], "kni", 3)) { volume = 0.6; if (equal(sample[14], "sla", 3)) { engfunc(EngFunc_EmitSound, id, channel, "extreme-shop/ESlash.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } if(equal(sample,"weapons/knife_deploy1.wav")) { engfunc(EngFunc_EmitSound, id, channel, "extreme-shop/EConvoca.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } if (equal(sample[14], "hit", 3)) { if (sample[17] == 'w') { engfunc(EngFunc_EmitSound, id, channel,"extreme-shop/EHitWall.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } else { engfunc(EngFunc_EmitSound, id, channel, "extreme-shop/EHit2.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } } if (equal(sample[14], "sta", 3)) { engfunc(EngFunc_EmitSound, id, channel, "extreme-shop/EStab.wav", volume, attn, flags, pitch); return FMRES_SUPERCEDE; } } return FMRES_IGNORED; } public Spawn_player(id) { if(is_user_alive(id) && is_user_connected(id)) { g_CrowBar[id] = false g_Chain[id] = false g_Electro[id] = false g_speed[id] = false g_HasWeapon[id] = false set_user_rendering(id) } } public clcmd_shop(id) { if(!is_user_alive(id)) return PLUGIN_HANDLED static menu[500], len len = 0 if(get_user_team(id) == 1) { len += formatex(menu[len], charsmax(menu) - len, "\rMagazin pentru detinuti^n^n") len += formatex(menu[len], charsmax(menu) - len, "\r1.\wPompa de desfundat chiuveta - \y%d $^n", get_pcvar_num(T_item_1)) len += formatex(menu[len], charsmax(menu) - len, "\r2.\wDrujba - \y%d $^n", get_pcvar_num(T_item_2)) len += formatex(menu[len], charsmax(menu) - len, "\r3.\w255 HP - \y%d $^n", get_pcvar_num(T_item_3)) len += formatex(menu[len], charsmax(menu) - len, "\r4.\wViteza - \y%d $^n", get_pcvar_num(T_item_4)) len += formatex(menu[len], charsmax(menu) - len, "\r5.\wGrenazi \r(HE, FL, SM)\w - \y%d $^n", get_pcvar_num(T_item_5)) len += formatex(menu[len], charsmax(menu) - len, "\r6.\wInvizibilitate \r(o data la 5 runde)\w - \y%d $^n", get_pcvar_num(T_item_6)) len += formatex(menu[len], charsmax(menu) - len, "\r7.\wGravitatie - \y%d $^n", get_pcvar_num(T_item_7)) len += formatex(menu[len], charsmax(menu) - len, "\r8.\wGlock - \y%d $^n", get_pcvar_num(T_item_8)) len += formatex(menu[len], charsmax(menu) - len, "\r0.\wIesire^n") show_menu(id, keysmenu, menu, -1, "MenuT") } if(get_user_team(id) == 2) { len += formatex(menu[len], charsmax(menu) - len, "\rMagazin pentru detinuti ^n^n") len += formatex(menu[len], charsmax(menu) - len, "\r1.\wElectro Shock-uri - \y%d $^n", get_pcvar_num(CT_item_1)) len += formatex(menu[len], charsmax(menu) - len, "\r2.\wInvizibilitate - \r(??? ? ???? ???????)\w - \y%d $^n", get_pcvar_num(CT_item_2)) len += formatex(menu[len], charsmax(menu) - len, "\r3.\wArma - \y%d $^n", get_pcvar_num(CT_item_3)) len += formatex(menu[len], charsmax(menu) - len, "\r4.\wViteza - \y%d $^n", get_pcvar_num(T_item_4)) len += formatex(menu[len], charsmax(menu) - len, "\r0.\wIesire^n") show_menu(id, keysmenu, menu, -1, "MenuCT") } return PLUGIN_HANDLED } public ShopT(id, key) { new alive = is_user_alive(id) new team = get_user_team(id) new user_money = cs_get_user_money(id) new CostT1 = get_pcvar_num(T_item_1) new CostT2 = get_pcvar_num(T_item_2) new CostT3 = get_pcvar_num(T_item_3) new CostT4 = get_pcvar_num(T_item_4) new CostT5 = get_pcvar_num(T_item_5) new CostT6 = get_pcvar_num(T_item_6) new CostT7 = get_pcvar_num(T_item_7) new CostT8 = get_pcvar_num(T_item_8) switch(key) { case 0: { if(user_money >= CostT1 && alive && team == 1 && !g_HasWeapon[id]) { engclient_cmd(id, "weapon_knife") set_pev(id, pev_viewmodel2, g_crow_viewmodel) set_pev(id, pev_weaponmodel2, g_crow_weaponmodel) g_CrowBar[id] = true g_HasWeapon[id] = true cs_set_user_money(id, user_money - CostT1) } else if(g_HasWeapon[id]) { client_printcolor(id, "/g[Magazin] /yAti cumparat deja." ) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 1: { if(user_money >= CostT2 && alive && team == 1 && !g_HasWeapon[id]) { engclient_cmd(id, "weapon_knife") set_pev(id, pev_viewmodel2, g_chain_viewmodel) set_pev(id, pev_weaponmodel2, g_chain_weaponmodel) g_Chain[id] = true g_HasWeapon[id] = true cs_set_user_money(id, user_money - CostT2) } else if(g_HasWeapon[id]) { client_printcolor(id, "/g[Magazin] /yAti cumparat deja." ) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 2: { if(user_money >= CostT3 && alive && team == 1) { set_user_health(id, 255) cs_set_user_money(id, user_money - CostT3) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 3: { if(user_money >= CostT4 && alive && team == 1) { set_user_maxspeed(id, 800.0) g_speed[id] = true cs_set_user_money(id, user_money - CostT4) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 4: { if(user_money >= CostT5 && alive && team == 1) { give_item(id, "weapon_hegrenade") give_item(id, "weapon_flashbang") give_item(id, "weapon_flashbang") give_item(id, "weapon_smokegrenade") cs_set_user_money(id, user_money - CostT5) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 5: { if(user_money >= CostT6 && alive & team == 1 && Round[id] == 0) { entity_set_int(id, EV_INT_body, 3) Round[id] = 5 cs_set_user_money(id, user_money - CostT6) } else if(Round[id] > 0) { client_printcolor(id, "/g[Magazin] Doar o data pe runda!", Round[id] ) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 6: { if(user_money >= CostT7 && alive & team == 1) { set_user_gravity(id, 0.1) cs_set_user_money(id, user_money - CostT7) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 7: { if(user_money >= CostT8 && alive & team == 1) { give_item(id, "weapon_glock18") cs_set_user_money(id, user_money - CostT8) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } } //menu_destroy(menu) return PLUGIN_HANDLED } public ShopCT(id, key) { new alive = is_user_alive(id) new team = get_user_team(id) new user_money = cs_get_user_money(id) new CostCT1 = get_pcvar_num(CT_item_1) new CostCT2 = get_pcvar_num(CT_item_2) new CostCT3 = get_pcvar_num(CT_item_3) new CostCT4 = get_pcvar_num(T_item_4) switch(key) { case 0: { if(user_money >= CostCT1 && alive && team == 2) { engclient_cmd(id, "weapon_knife") set_pev(id, pev_viewmodel2, g_electro_viewmodel) set_pev(id, pev_weaponmodel2, g_electro_weaponmodel) g_Electro[id] = true cs_set_user_money(id, user_money - CostCT1) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 1: { if(user_money >= CostCT2 && alive && team == 2 && Round[id] == 0) { set_user_rendering(id, kRenderFxGlowShell, 0 , 0 , 0 , kRenderTransAlpha, 0 ) Round[id] = 5 cs_set_user_money(id, user_money - CostCT2) } else if(Round[id] > 0) { client_printcolor(id, "/g[Magazin] /yDoar o data pe runda", Round[id] ) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 2: { if(user_money >= CostCT3 && alive && team == 2) { cs_set_user_armor(id, 500, CS_ARMOR_VESTHELM) set_user_health(id, 500) give_item(id, "weapon_m249") cs_set_user_bpammo(id, CSW_M249, 200) cs_set_user_money(id, user_money - CostCT3) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } case 3: { if(user_money >= CostCT4 && alive && team == 2) { set_user_maxspeed(id, 320.0) g_speed[id] = true cs_set_user_money(id, user_money - CostCT4) } else { client_printcolor(id, "/g[Magazin] /y Nu aveti suficienti bani." ) } } } return PLUGIN_HANDLED } public round_start() { for(new id = 0; id < 33; id++) { if(Round[id] > 0 && is_user_alive(id)) { Round[id] -= 1 } } } bool:IsGrenade(i_Inflictor) { static s_Classname[8]; pev(i_Inflictor, pev_classname, s_Classname, charsmax(s_Classname)); return equal(s_Classname, "grenade") ? true : false; } stock client_printcolor(const id, const input[], any:...) { new iCount = 1, iPlayers[32] static szMsg[191] vformat(szMsg, charsmax(szMsg), input, 3) replace_all(szMsg, 190, "/g", "^4") // green txt replace_all(szMsg, 190, "/y", "^1") // orange txt replace_all(szMsg, 190, "/ctr", "^3") // team txt replace_all(szMsg, 190, "/w", "^0") // team txt if(id) iPlayers[0] = id else get_players(iPlayers, iCount, "ch") for (new i = 0; i < iCount; i++) { if (is_user_connected(iPlayers)) { message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayers) write_byte(iPlayers) write_string(szMsg) message_end() } } }
+ Resurse
-
- Membru, skill 0
- Posts: 18
- Joined: 11 Apr 2013, 19:36
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Contact:
-
- Membru, skill 0
- Posts: 18
- Joined: 11 Apr 2013, 19:36
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Contact:
-
- Membru, skill 0
- Posts: 18
- Joined: 11 Apr 2013, 19:36
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Contact:
-
- Membru, skill 0
- Posts: 18
- Joined: 11 Apr 2013, 19:36
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Contact:
- vladu888
- Membru, skill +1
- Posts: 272
- Joined: 29 Jun 2013, 09:54
- Detinator Steam: Nu
- CS Status: Joc Furien.
- Location: Fagaras,Brasov
- Has thanked: 46 times
- Been thanked: 13 times
- Contact:
Da-mi si mie un multumesc daca te-am ajutat e un shop cu arme pentru Detinuti contine mai multe awp m4a1 ak47 desigur mai scumper 26000$ 26000$ si awp 35000$ are mai multe bhop godmode gravitate etc sper ca te-am ajutat l-am avut pe vecgiul meu sv si m-am gandit sa ti-l dau si tie.
- | Afiseaza codul
/********************************************************/ /* Mega Shop by: TheArmagedon */ /* */ /* ##Weapon Shop## */ /* ##Extras Shop## */ /* ##Admin Shop## */ /* */ /* Change the Cvars on mega_shop.cfg */ /* */ /* Changelog: */ /* v1.1 */ /* amx_ms_pweapon_damage [DMG] = Default: 2.0 */ /* */ /* v1.2 */ /* amx_ms_oneround [1/0] = Default: 1 */ /* */ /* Sorry if my english is bad. */ /* */ /********************************************************/ //////////////////////////////////////////////////////////////////////////////////////////////////// // INCLUDES //////////////////////////////////////////////////////////////////////////////////////////////////// #include <amxmodx> #include <fun> #include <fakemeta_util> #include <hamsandwich> #include <amxmisc> #include <cstrike> #include <engine> #include <money_ul> //////////////////////////////////////////////////////////////////////////////////////////////////// // Define //////////////////////////////////////////////////////////////////////////////////////////////////// #define HE_GRENADE (1<<0) #define SMOKE_GRENADE (1<<1) #define FLASH_GRENADE (1<<2) #define MAX_PLAYERS 32 #define MAXSLOTS 32 //////////////////////////////////////////////////////////////////////////////////////////////////// // COLORCHAT //////////////////////////////////////////////////////////////////////////////////////////////////// enum Color { YELLOW = 1, // Yellow GREEN, // Green Color TEAM_COLOR, // Red, grey, blue GREY, // grey RED, // Red BLUE, // Blue } new TeamInfo; new SayText; new MaxSlots; new TeamName[][] = { "", "TERRORIST", "CT", "SPECTATOR" } new bool:IsConnected[MAXSLOTS + 1]; //////////////////////////////////////////////////////////////////////////////////////////////////// // Pcvars //////////////////////////////////////////////////////////////////////////////////////////////////// new plugin_onoff, specspeed, speclife, specgrav, gravcost, ammocost, speccost, bhopcost, silentcost, glowcost new gravityam, bhop_onoff, ammo_onoff, grav_onoff, spec_onoff, silent_onoff, glow_onoff, noclip_onoff new noclipcost, nocliptime, gmodetime, gmodecost, gmode_onoff, money_onoff, pweapdmgmulti, one_round // Menus-pcvar new admmenuon, extrason, weaponson // Weap.Menu - pcvar new powerawp, powerak, powercolt new akcost, awpcost, coltcost // NOCLIP #define GetPlayerHullSize(%1) ( ( pev ( %1, pev_flags ) & FL_DUCKING ) ? HULL_HEAD : HULL_HUMAN ) enum Coord_e { Float:x, Float:y, Float:z }; //////////////////////////////////////////////////////////////////////////////////////////////////// // Bool's //////////////////////////////////////////////////////////////////////////////////////////////////// new bool:has_awp[33] new bool:has_ak[33] new bool:has_colt[33] new bool:g_Gravity[33] new bool:g_UnAmmo[33] new bool:g_Alive[33] new bool:g_SilentF[33] new bool:g_Glow[33] new bool:g_GodMode[33] new bool:g_NoClip[33] new bool:oneRound[33] // Bhop new bool:g_HasBhop[33] new g_iCdWaterJumpTime[33] new gMaxPlayers; //////////////////////////////////////////////////////////////////////////////////////////////////// // Plugin Start //////////////////////////////////////////////////////////////////////////////////////////////////// public plugin_init() { // Register Plugin register_plugin("Mega Shop","1.2","TheArmagedon") // Register Lang register_dictionary("mega_shop.txt") // Say register_clcmd("say /magazin2","ovomenu"); register_clcmd("say_team /magazin2","ovomenu"); register_clcmd("say /shop2", "ovomenu"); register_clcmd("say_team /shop2", "ovomenu"); // Cvar's plugin_onoff = register_cvar("amx_mega_shop", "1") one_round = register_cvar("amx_ms_oneround", "1") grav_onoff = register_cvar("amx_ms_gravity", "1") spec_onoff = register_cvar("amx_ms_special", "1") bhop_onoff = register_cvar("amx_ms_bunnyhop", "1") ammo_onoff = register_cvar("amx_ms_ammo", "1") silent_onoff = register_cvar("amx_ms_silentf", "1") glow_onoff = register_cvar("amx_ms_glow", "1") noclip_onoff = register_cvar("amx_ms_noclip", "1") gmode_onoff = register_cvar("amx_ms_godmode", "1") money_onoff = register_cvar("amx_ms_money", "1") gravityam = register_cvar("amx_ms_gravity_amount", "0.5") specspeed = register_cvar("amx_ms_special_speed", "500.0") speclife = register_cvar("amx_ms_special_life", "150") specgrav = register_cvar("amx_ms_special_gravity", "0.7") weaponson = register_cvar("amx_ms_weapon_menu", "1") extrason = register_cvar("amx_ms_extra_menu", "1") admmenuon = register_cvar("amx_ms_admin_menu", "1") powerawp = register_cvar("amx_ms_weapon_awp", "1") powerak = register_cvar("amx_ms_weapon_ak47", "1") powercolt = register_cvar("amx_ms_weapon_m4a1", "1") // Cvar's --- Price - EXTRAS gravcost = register_cvar("amx_ms_gravity_cost", "9000") ammocost = register_cvar("amx_ms_ammo_cost", "16000") speccost = register_cvar("amx_ms_special_cost", "13000") bhopcost = register_cvar("amx_ms_bhop_cost", "15000") silentcost = register_cvar("amx_ms_silentf_cost", "7000") glowcost = register_cvar("amx_ms_glow_cost", "3000") // Cvar's --- Price/dmg - WEAPONS awpcost = register_cvar("amx_ms_awp_cost", "16000") akcost = register_cvar("amx_ms_ak47_cost", "15000") coltcost = register_cvar("amx_ms_colt_cost", "15000") pweapdmgmulti = register_cvar("amx_ms_pweapon_damage", "2.0") // 2.0 Double DMG // Cvar's --- Price - ADMIN MENU noclipcost = register_cvar("amx_ms_noclip_cost", "15000") gmodecost = register_cvar("amx_ms_godmod_cost", "16000") nocliptime = register_cvar("amx_ms_noclip_time", "10.0") gmodetime = register_cvar("amx_ms_godmod_time", "10.0") // Bhop RegisterHam(Ham_Player_Jump, "player", "Player_Jump") register_forward(FM_UpdateClientData, "UpdateClientData") register_forward(FM_CmdStart, "CmdStart") // AMMO register_event("CurWeapon" , "event_CurWeapon" , "be" , "1=1"); // Weapons register_event( "Damage", "event_damage", "be" ) // Death register_event( "DeathMsg", "EventDeath", "a"); // COLORCHAT TeamInfo = get_user_msgid("TeamInfo"); SayText = get_user_msgid("SayText"); MaxSlots = get_maxplayers(); // ROUND START register_logevent( "Event_RoundStart", 2, "1=Round_Start" ); // Max Players gMaxPlayers = get_maxplayers(); } //////////////////////////////////////////////////////////////////////////////////////////////////// // Precache Model //////////////////////////////////////////////////////////////////////////////////////////////////// public plugin_precache() { precache_model("models/v_awp.mdl") precache_model("models/v_ak47.mdl") precache_model("models/v_m4a1.mdl") } //////////////////////////////////////////////////////////////////////////////////////////////////// // STOCKS //////////////////////////////////////////////////////////////////////////////////////////////////// stock maxclip(wpnid) { static ca; ca = 0; switch (wpnid) { case CSW_P228 : ca = 13; case CSW_SCOUT : ca = 10; case CSW_HEGRENADE : ca = 0; case CSW_XM1014 : ca = 7; case CSW_C4 : ca = 0; case CSW_MAC10 : ca = 30; case CSW_AUG : ca = 30; case CSW_SMOKEGRENADE : ca = 0; case CSW_ELITE : ca = 15; case CSW_FIVESEVEN : ca = 20; case CSW_UMP45 : ca = 25; case CSW_SG550 : ca = 30; case CSW_GALI : ca = 35; case CSW_FAMAS : ca = 25; case CSW_USP : ca = 12; case CSW_GLOCK18 : ca = 20; case CSW_AWP : ca = 10; case CSW_MP5NAVY : ca = 30; case CSW_M249 : ca = 100; case CSW_M3 : ca = 8; case CSW_M4A1 : ca = 30; case CSW_TMP : ca = 30; case CSW_G3SG1 : ca = 20; case CSW_FLASHBANG : ca = 0; case CSW_DEAGLE : ca = 7; case CSW_SG552 : ca = 30; case CSW_AK47 : ca = 30; case CSW_P90 : ca = 50; } return ca; } stock nade_flags() { static buffer[8]; return read_flags(buffer); } stock log_kill(killer, victim, weapon[],headshot) { user_silentkill( victim ); message_begin( MSG_ALL, get_user_msgid( "DeathMsg" ), {0,0,0}, 0 ); write_byte( killer ); write_byte( victim ); write_byte( headshot ); write_string( weapon ); message_end(); new kfrags = get_user_frags( killer ); set_user_frags( killer, kfrags++ ); new vfrags = get_user_frags( victim ); set_user_frags( victim, vfrags++ ); return PLUGIN_CONTINUE } //////////////////////////////////////////////////////////////////////////////////////////////////// // IS USER ALIVE //////////////////////////////////////////////////////////////////////////////////////////////////// public Check_Alive(id) { g_Alive[id] = bool:is_user_alive(id) } //////////////////////////////////////////////////////////////////////////////////////////////////// // Death EVENT //////////////////////////////////////////////////////////////////////////////////////////////////// public EventDeath( ) { new iVictim = read_data( 2 ); disableall(iVictim) g_Alive[iVictim] = bool:is_user_alive(iVictim) return PLUGIN_CONTINUE; } //////////////////////////////////////////////////////////////////////////////////////////////////// // ROUND START //////////////////////////////////////////////////////////////////////////////////////////////////// public Event_RoundStart( ) { new iPlayers[32], iNum get_players( iPlayers, iNum, "c" ); for(new i; i < iNum; i++) disableall(iPlayers) } //////////////////////////////////////////////////////////////////////////////////////////////////// // UNLIMITED AMMO //////////////////////////////////////////////////////////////////////////////////////////////////// public event_CurWeapon(id) { if(!is_user_alive(id)) return PLUGIN_CONTINUE; if(g_UnAmmo[id]) { static wpnid, clip; wpnid = read_data(2); clip = read_data(3); give_ammo(id , wpnid , clip); } return PLUGIN_CONTINUE; } //////////////////////////////////////////////////////////////////////////////////////////////////// // WELCOME MSG / CONFIG //////////////////////////////////////////////////////////////////////////////////////////////////// public client_putinserver(id) { set_task(8.0, "sv_msg", id) set_task(150.0, "sv_msg", id, _, _, "b") } public plugin_cfg() { new icfg[32] get_configsdir(icfg, sizeof icfg - 1); server_cmd("exec %s/mega_shop.cfg", icfg) server_exec(); } public sv_msg(id) { ColorChat(id, RED, "%L", id, "WELCOME_MSG"); } //////////////////////////////////////////////////////////////////////////////////////////////////// // SET ALL FALSE ON CLIENT CONNECT/DISCONNECT //////////////////////////////////////////////////////////////////////////////////////////////////// public client_connect(id) { g_UnAmmo[id] = false; g_Gravity[id] = false; g_HasBhop[id] = false; g_Glow[id] = false g_NoClip[id] = false g_GodMode[id] = false // Set oneRound true oneRound[id] = true } public client_disconnect(id) { g_UnAmmo[id] = false; g_Gravity[id] = false; g_HasBhop[id] = false; g_Alive[id] = false g_Glow[id] = false g_NoClip[id] = false g_GodMode[id] = false } //////////////////////////////////////////////////////////////////////////////////////////////////// // UNLIMITED AMMO (GIVE AMMO) //////////////////////////////////////////////////////////////////////////////////////////////////// public give_ammo(id , wpnid , clip) { if(!is_user_alive(id)) return; if( wpnid==CSW_C4 || wpnid==CSW_KNIFE || wpnid==CSW_HEGRENADE || wpnid==CSW_SMOKEGRENADE || wpnid==CSW_FLASHBANG ) return; if(!clip) { static weapname[33]; get_weaponname(wpnid , weapname , 32); static wpn wpn = -1; while((wpn = find_ent_by_class(wpn , weapname)) != 0) { if(id == entity_get_edict(wpn , EV_ENT_owner)) { cs_set_weapon_ammo(wpn , maxclip(wpnid)) break; } } } } // Check nades public check_for_nades(id) { if(!is_user_alive(id)) return; if(nade_flags() & HE_GRENADE) { if(!user_has_weapon(id , CSW_HEGRENADE)) give_item(id , "weapon_hegrenade"); } if(nade_flags() & SMOKE_GRENADE) { if(!user_has_weapon(id , CSW_SMOKEGRENADE)) give_item(id , "weapon_smokegrenade"); } if(nade_flags() & FLASH_GRENADE) { if(!user_has_weapon(id , CSW_FLASHBANG)) give_item(id , "weapon_flashbang"); } } //////////////////////////////////////////////////////////////////////////////////////////////////// // PLAYER DIE //////////////////////////////////////////////////////////////////////////////////////////////////// public fw_PlayerKilled(victim, attacker, shouldgib) { // Victim has Gravity/Bhop/Unlimited Ammo if(g_Gravity[victim] && g_HasBhop[victim] && g_UnAmmo[victim]) { g_Gravity[victim] = false g_HasBhop[victim] = false g_UnAmmo[victim] = false } // Victim has P.Weapon's if(has_ak[victim] && has_awp[victim] && has_colt[victim]) { has_colt[victim] = false has_ak[victim] = false has_awp[victim] = false } } //////////////////////////////////////////////////////////////////////////////////////////////////// // MENU START! //////////////////////////////////////////////////////////////////////////////////////////////////// public ovomenu(id) { new Buffer[32] if(oneRound[id] == true) { if(get_pcvar_num(plugin_onoff) == 1) { if(is_user_alive(id)) { new menu = menu_create("Main Menu:", "menu_handler"); if(get_pcvar_num(weaponson) == 1) { formatex(Buffer, 31, "%L", id, "MENU_ITEM_1", 0); menu_additem(menu, Buffer, "1"); } if(get_pcvar_num(extrason) == 1) { formatex(Buffer, 31, "%L", id, "MENU_ITEM_2", 0); menu_additem(menu, Buffer, "2"); } if(get_pcvar_num(admmenuon) == 1 && get_user_flags(id) & ADMIN_IMMUNITY) { formatex(Buffer, 31, "%L", id, "MENU_ITEM_3", 0); menu_additem(menu, Buffer, "3"); } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Ai deschis ^4Magazinul."); } menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); //Menu Display menu_display(id, menu, 0); } else ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Trebuie sa fi in viata."); return PLUGIN_HANDLED; } else ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Functie dezactivata."); return PLUGIN_HANDLED; } else ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "ONEPERROUND"); return PLUGIN_HANDLED; } // Show Weapon/Extras/Adm Menu public menu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], szName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback); new key = str_to_num(data); switch(key) { case 1: { menuweapon(id) } case 2: { menuextra(id) } case 3: { menuadm(id) } } menu_destroy(menu); return PLUGIN_HANDLED; } //////////////////////////////////////////////////////////////////////////////////////////////////// // WEAPON MENU //////////////////////////////////////////////////////////////////////////////////////////////////// public menuweapon(id) { new Buffer[32] if(get_pcvar_num(weaponson) == 1) { if(is_user_alive(id)) { new menu = menu_create("Meniu Arme:", "sec_menu_handler"); if(get_pcvar_num(powerawp) == 1) { formatex(Buffer, 31, "SUPER AWP - (%d$)", get_pcvar_num(awpcost)); menu_additem(menu, Buffer, "1"); } if(get_pcvar_num(powerak) == 1) { formatex(Buffer, 31, "SUPER AK47 - (%d$)", get_pcvar_num(akcost)); menu_additem(menu, Buffer, "2"); } if(get_pcvar_num(powercolt) == 1) { formatex(Buffer, 31, "SUPER Colt-M4A1 - (%d$)", get_pcvar_num(coltcost)); menu_additem(menu, Buffer, "3"); } menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); //Menu Display menu_display(id, menu, 0); } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Trebuie sa fi in viata."); return PLUGIN_HANDLED; } } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Functie dezactivata."); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } // Weapon Menu function public sec_menu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], szName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback); new key = str_to_num(data); switch(key) { case 1: { if(get_pcvar_num(powercolt) == 0) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am aceasta arma in magazin, alege alta."); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(awpcost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4SUPER Awp.", id, "BUY"); has_awp[id] = true give_item(id, "weapon_awp"); if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } new Weapon = get_user_weapon(id) if(Weapon == CSW_AWP) entity_set_string(id, EV_SZ_viewmodel, "models/v_awp.mdl") } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 2: { if(get_pcvar_num(powercolt) == 0) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am aceasta arma in magazin, alege alta."); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(akcost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4SUPER AK-47.", id, "BUY"); has_ak[id] = true give_item(id, "weapon_ak47"); if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } new Weapon = get_user_weapon(id) if(Weapon == CSW_AK47) entity_set_string(id, EV_SZ_viewmodel, "models/v_ak47.mdl") } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 3: { if(get_pcvar_num(powercolt) == 0) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am aceasta arma in magazin, alege alta."); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(coltcost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4SUPER M4A1.", id, "BUY"); has_colt[id] = true if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } give_item(id, "weapon_m4a1"); new Weapon = get_user_weapon(id) if(Weapon == CSW_M4A1) entity_set_string(id, EV_SZ_viewmodel, "models/v_m4a1.mdl") } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } } menu_destroy(menu); return PLUGIN_HANDLED; } //////////////////////////////////////////////////////////////////////////////////////////////////// // EXTRAS MENU //////////////////////////////////////////////////////////////////////////////////////////////////// public menuextra(id) { new Buffer[32] if(get_pcvar_num(extrason) == 1) { if(is_user_alive(id)) { new menu = menu_create("Extra Menu:", "trd_menu_handler"); if(get_pcvar_num(grav_onoff) == 1) { formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_LOW_GRAV", get_pcvar_num(gravcost)); menu_additem(menu, Buffer, "1"); } if(get_pcvar_num(ammo_onoff) == 1) { formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_UNLI_AMMO", get_pcvar_num(ammocost)); menu_additem(menu, Buffer, "2"); } if(get_pcvar_num(bhop_onoff) == 1) { formatex(Buffer, 31, "BunnyHop - (%d$)", get_pcvar_num(bhopcost)); menu_additem(menu, Buffer, "3"); } if(get_pcvar_num(spec_onoff) == 1) { formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_SPEC_ARMOR", get_pcvar_num(speccost)); menu_additem(menu, Buffer, "4"); } if(get_pcvar_num(silent_onoff) == 1) { formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_SILENT_STEP", get_pcvar_num(silentcost)); menu_additem(menu, Buffer, "5"); } if(get_pcvar_num(glow_onoff) == 1) { formatex(Buffer, 31, "%L - (%d$)", id, "EXTRA_GLOW", get_pcvar_num(glowcost)); menu_additem(menu, Buffer, "6"); } menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); //Menu Display menu_display(id, menu, 0); } else ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Trebuie sa fi in viata."); return PLUGIN_HANDLED; } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Functie dezactivata."); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } // Extra Menu Function public trd_menu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], szName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback); new key = str_to_num(data); switch(key) { case 1: { if(get_pcvar_num(grav_onoff) == 0) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am gravitate in magazin, cumpara altceva!"); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(gravcost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Ai cumparat ^4Gravitate Mica!"); g_Gravity[id] = true; if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } set_user_gravity(id, get_pcvar_float(gravityam)); } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 2: { if(get_pcvar_num(ammo_onoff) == 0){ ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am gloante infinite in magazin, cumpara altceva!!"); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(ammocost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4Gloante Infinite!", id, "BUY"); g_UnAmmo[id] = true; if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 3: { if(get_pcvar_num(bhop_onoff) == 0){ ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am bhop in magazin, cumpara altceva!!"); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(bhopcost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4Bhop!", id, "BUY"); g_HasBhop[id] = true; if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 4: { if(get_pcvar_num(spec_onoff) == 0){ ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am armura speciala in magazin, cumpara altceva!!"); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(speccost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4Armura Speciala!", id, "BUY"); g_Gravity[id] = true; if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } set_user_maxspeed(id, get_pcvar_float(specspeed)); set_user_health(id, get_pcvar_num(speclife)); set_user_gravity(id, get_pcvar_float(specgrav)); } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 5: { if(get_pcvar_num(silent_onoff) == 0){ ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am adidasi nike in magazin, cumpara altceva!!"); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(silentcost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L Ai cumparat ^4Adidasi Nike!", id, "BUY"); g_SilentF[id] = true; if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } set_user_footsteps(id, 1) } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 6: { if(get_pcvar_num(glow_onoff) == 0){ ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am stralucire in magazin, cumpara altceva!!"); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(glowcost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); new col1 = random_num(0, 255) new col2 = random_num(0, 255) new col3 = random_num(0, 255) ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4Stralucire!", id, "BUY"); g_Glow[id] = true; if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } set_user_rendering(id, kRenderFxGlowShell, col1, col2, col3, kRenderNormal, 25) } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } } menu_destroy(menu); return PLUGIN_HANDLED; } //////////////////////////////////////////////////////////////////////////////////////////////////// // ADMIN MENU //////////////////////////////////////////////////////////////////////////////////////////////////// public menuadm(id) { new Buffer[32] if(get_pcvar_num(weaponson) == 1) { if(is_user_alive(id)) { new menu = menu_create("Admin Menu:", "adm_menu_handler"); if(get_pcvar_num(noclip_onoff) == 1) { formatex(Buffer, 31, "Noclip [%d Sec] - (%d$)", get_pcvar_num(nocliptime), get_pcvar_num(noclipcost)); menu_additem(menu, Buffer, "1"); } if(get_pcvar_num(gmode_onoff) == 1) { formatex(Buffer, 31, "Godmode [%d Sec] - (%d$)", get_pcvar_num(gmodetime), get_pcvar_num(gmodecost)); menu_additem(menu, Buffer, "2"); } if(get_pcvar_num(money_onoff) == 1) { formatex(Buffer, 31, "+ 16000$", 0); menu_additem(menu, Buffer, "3"); } menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); //Menu Display menu_display(id, menu, 0); } else ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Trebuie sa fi in viata."); return PLUGIN_HANDLED; } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Functie dezactivata."); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } // Admin Menu Function public adm_menu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], szName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback); new key = str_to_num(data); switch(key) { case 1: { if(get_pcvar_num(noclip_onoff) == 0) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am noclip in magazin, cumpara altceva!"); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(noclipcost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4Noclip.", id, "BUY"); g_NoClip[id] = true; if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } set_user_noclip(id, 1) set_task(get_pcvar_float(nocliptime), "remove_noclip", id); } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 2: { if(get_pcvar_num(gmode_onoff) == 0) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am godmode in magazin, cumpara altceva!"); return PLUGIN_HANDLED; } new money = cs_get_user_money_ul(id); new cost = get_pcvar_num(gmodecost); if(money > cost || money == cost) { cs_set_user_money_ul(id, money - cost); ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L ^4God Mode.", id, "BUY"); g_GodMode[id] = true if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } set_user_godmode(id,1) set_task(get_pcvar_float(gmodetime), "remove_gmode", id); } else { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 %L.", id, "MONEY"); } } case 3: { if(get_pcvar_num(money_onoff) == 0) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai am bani in magazin, cumpara altceva!"); return PLUGIN_HANDLED; } ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Ai primit 16000$."); cs_set_user_money_ul(id, 16000); if(get_pcvar_num(one_round) == 1) { oneRound[id] = false; } else { oneRound[id] = true; } } } menu_destroy(menu); return PLUGIN_HANDLED; } //////////////////////////////////////////////////////////////////////////////////////////////////// // Remove GodMode/Noclip //////////////////////////////////////////////////////////////////////////////////////////////////// // Remove Gmode (TIME) public remove_gmode(id) { g_GodMode[id] = false; ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Invincibilitatea ta s-a terminat.") set_user_godmode(id,0) } // Remove Noclip (TIME) public remove_noclip(id) { g_NoClip[id] = false; ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 NoClip-ul tau s-a dezactivat.") set_user_noclip(id, 0) ClientCommand_UnStick(id) } //////////////////////////////////////////////////////////////////////////////////////////////////// // BunnyHOP //////////////////////////////////////////////////////////////////////////////////////////////////// public CmdStart(id, uc_handle, seed) { if( is_user_alive(id) && g_HasBhop[id] && get_uc(uc_handle, UC_Buttons) & IN_USE && pev(id, pev_flags) & FL_ONGROUND ) { static Float:fVelocity[3] pev(id, pev_velocity, fVelocity) fVelocity[0] *= 0.3 fVelocity[1] *= 0.3 fVelocity[2] *= 0.3 set_pev(id, pev_velocity, fVelocity) } } public Player_Jump(id) { if( !is_user_alive(id) ) { return } if( g_iCdWaterJumpTime[id] ) { return } if( pev(id, pev_waterlevel) >= 2 ){ return } static iFlags ; iFlags = pev(id, pev_flags) if( !(iFlags & FL_ONGROUND) ){ return } static iOldButtons ; iOldButtons = pev(id, pev_oldbuttons) if( !g_HasBhop[id] && iOldButtons & IN_JUMP ){ return } set_pev(id, pev_oldbuttons, iOldButtons | IN_JUMP) static Float:fVelocity[3] pev(id, pev_velocity, fVelocity) static Float:fFrameTime, Float:fPlayerGravity global_get(glb_frametime, fFrameTime) pev(id, pev_gravity, fPlayerGravity) new iLJ if( (pev(id, pev_bInDuck) || iFlags & FL_DUCKING) && get_pdata_int(id, 356) && pev(id, pev_button) & IN_DUCK && pev(id, pev_flDuckTime) ){ static Float:fPunchAngle[3], Float:fForward[3] pev(id, pev_punchangle, fPunchAngle) fPunchAngle[0] = -5.0 set_pev(id, pev_punchangle, fPunchAngle) global_get(glb_v_forward, fForward) fVelocity[0] = fForward[0] * 560 fVelocity[1] = fForward[1] * 560 fVelocity[2] = 299.33259094191531084669989858532 iLJ = 1 } else { fVelocity[2] = 268.32815729997476356910084024775 } fVelocity[2] -= fPlayerGravity * fFrameTime * 0.5 * 800 set_pev(id, pev_velocity, fVelocity) set_pev(id, pev_gaitsequence, 6+iLJ) set_pev(id, pev_frame, 0.0) } public UpdateClientData(id, sendweapons, cd_handle) { g_iCdWaterJumpTime[id] = get_cd(cd_handle, CD_WaterJumpTime) } //////////////////////////////////////////////////////////////////////////////////////////////////// // POWER WEAPONS //////////////////////////////////////////////////////////////////////////////////////////////////// public event_damage( id ) { new victim_id = id; if( !is_user_connected( victim_id ) ) return PLUGIN_CONTINUE new dmg_take = read_data( 2 ); new dmgtype = read_data( 3 ); new Float:damage = dmg_take * get_pcvar_float(pweapdmgmulti); new health = get_user_health( victim_id ); new frag = get_user_frags(id); new iWeapID, attacker_id = get_user_attacker( victim_id, iWeapID ); if( !is_user_connected( attacker_id ) || !is_user_alive( victim_id ) ) { return PLUGIN_HANDLED } // AWP DMG if( iWeapID == CSW_AWP && has_awp[attacker_id] ) { if( floatround(damage) >= health ) { if( victim_id == attacker_id ) { return PLUGIN_CONTINUE }else{ log_kill( attacker_id, victim_id, "awp", 0 ); } return PLUGIN_CONTINUE }else { if( victim_id == attacker_id ) return PLUGIN_CONTINUE fakedamage( victim_id, "weapon_awp", damage, dmgtype ); set_user_frags(id, frag++) } } // AK47 DMG if( iWeapID == CSW_AK47 && has_ak[attacker_id] ) { if( floatround(damage) >= health ) { if( victim_id == attacker_id ) { return PLUGIN_CONTINUE }else{ log_kill( attacker_id, victim_id, "ak47", 0 ); } return PLUGIN_CONTINUE }else { if( victim_id == attacker_id ) return PLUGIN_CONTINUE fakedamage( victim_id, "weapon_ak47", damage, dmgtype); set_user_frags(id, frag++) } } // COLT DMG if(iWeapID == CSW_M4A1 && has_colt[attacker_id]) { if( floatround(damage) >= health ) { if( victim_id == attacker_id ) { return PLUGIN_CONTINUE }else{ log_kill( attacker_id, victim_id, "m4a1", 0 ); } return PLUGIN_CONTINUE }else { if( victim_id == attacker_id ) return PLUGIN_CONTINUE fakedamage( victim_id, "weapon_m4a1", damage, dmgtype); set_user_frags(id, frag++) } } return PLUGIN_CONTINUE } // Normal Weapon Model (P.Weapon) public CurWeapon(id) { // AWP if(get_pcvar_num(powerawp)) { new Weapon = read_data(2) if(Weapon == CSW_AWP && has_awp[id]) entity_set_string(id, EV_SZ_viewmodel, "models/v_awp.mdl") } // AK47 if(get_pcvar_num(powerak)) { new Weapon = read_data(2) if(Weapon == CSW_AK47 && has_ak[id]) entity_set_string(id, EV_SZ_viewmodel, "models/v_ak47.mdl") } // Colt-m4a1 if(get_pcvar_num(powercolt)) { new Weapon = read_data(2) if(Weapon == CSW_M4A1 && has_colt[id]) entity_set_string(id, EV_SZ_viewmodel, "models/v_m4a1.mdl") } } //////////////////////////////////////////////////////////////////////////////////////////////////// // DISABLE ALL ITEMS //////////////////////////////////////////////////////////////////////////////////////////////////// public disableall(id) { if(g_HasBhop[id]) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai ai Bhop.") g_HasBhop[id] = false; } if(g_UnAmmo[id]) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai ai gloante infinite.") g_UnAmmo[id] = false; } if(g_SilentF[id]) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Cineva ti-a furat Adidasii Nike.") g_SilentF[id] = false; set_user_footsteps(id, 0) } if(g_Glow[id]) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai stralucesti.") g_Glow[id] = false; set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 0) } if(g_GodMode[id]) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai ai INVINCIBILITATE.") g_GodMode[id] = false set_user_godmode(id,0) } if(g_NoClip[id]) { ColorChat(id, BLUE, "^4[Lunetistii.Ro]^3 Nu mai esti fantoma.") g_NoClip[id] = false set_user_noclip(id,0) } if(get_pcvar_num(plugin_onoff) == 1) { oneRound[id] = true } } //////////////////////////////////////////////////////////////////////////////////////////////////// // UNSTUCK (NOCLIP) - Sorry if the code is not my friend, but I got the code from my friend. //////////////////////////////////////////////////////////////////////////////////////////////////// public ClientCommand_UnStick ( const id ) { new i_Value; if ( ( i_Value = UTIL_UnstickPlayer ( id, 32, 128 ) ) != 1 ) { switch ( i_Value ) { case 0 : client_print ( id, print_chat, "Te-ai blocat ca un *****!" ); case -1 : client_print ( id, print_console, "..." ); } } return PLUGIN_CONTINUE; } UTIL_UnstickPlayer ( const id, const i_StartDistance, const i_MaxAttempts ) { // --| Not alive, ignore. if ( !is_user_alive ( id ) ) return -1 static Float:vf_OriginalOrigin[ Coord_e ], Float:vf_NewOrigin[ Coord_e ]; static i_Attempts, i_Distance; // --| Get the current player's origin. pev ( id, pev_origin, vf_OriginalOrigin ); i_Distance = i_StartDistance; while ( i_Distance < 1000 ) { i_Attempts = i_MaxAttempts; while ( i_Attempts-- ) { vf_NewOrigin[ x ] = random_float ( vf_OriginalOrigin[ x ] - i_Distance, vf_OriginalOrigin[ x ] + i_Distance ); vf_NewOrigin[ y ] = random_float ( vf_OriginalOrigin[ y ] - i_Distance, vf_OriginalOrigin[ y ] + i_Distance ); vf_NewOrigin[ z ] = random_float ( vf_OriginalOrigin[ z ] - i_Distance, vf_OriginalOrigin[ z ] + i_Distance ); engfunc ( EngFunc_TraceHull, vf_NewOrigin, vf_NewOrigin, DONT_IGNORE_MONSTERS, GetPlayerHullSize ( id ), id, 0 ); // --| Free space found. if ( get_tr2 ( 0, TR_InOpen ) && !get_tr2 ( 0, TR_AllSolid ) && !get_tr2 ( 0, TR_StartSolid ) ) { // --| Set the new origin . engfunc ( EngFunc_SetOrigin, id, vf_NewOrigin ); return 1; } } i_Distance += i_StartDistance; } // --| Could not be found. return 0; } //////////////////////////////////////////////////////////////////////////////////////////////////// // COLOR CHAT //////////////////////////////////////////////////////////////////////////////////////////////////// public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...) { static message[256]; switch(type) { case YELLOW: // Yellow { message[0] = 0x01; } case GREEN: // Green { message[0] = 0x04; } default: // White, Red, Blue { message[0] = 0x03; } } vformat(message[1], 251, msg, 4); // Make sure message is not longer than 192 character. Will crash the server. message[192] = '^0'; new team, ColorChange, index, MSG_Type; if(!id) { index = FindPlayer(); MSG_Type = MSG_ALL; } else { MSG_Type = MSG_ONE; index = id; } team = get_user_team(index); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if(ColorChange) { Team_Info(index, MSG_Type, TeamName[team]); } } ShowColorMessage(id, type, message[]) { message_begin(type, SayText, _, id); write_byte(id) write_string(message); message_end(); } Team_Info(id, type, team[]) { message_begin(type, TeamInfo, _, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type) { switch(Type) { case RED: { return Team_Info(index, type, TeamName[1]); } case BLUE: { return Team_Info(index, type, TeamName[2]); } case GREY: { return Team_Info(index, type, TeamName[0]); } } return 0; } FindPlayer() { new i = -1; while(i <= MaxSlots) { if(IsConnected[++i]) { return i; } } return -1; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par } */
Jump to
- eXtream - Forum
- ↳ Steam
- ↳ Forum
- ↳ WebDesign
- ↳ Incepatori
- ↳ Cos de reciclare
- ↳ Discutii generale
- ↳ Anunturi
- ↳ Security zone
- ↳ Filme si seriale
- ↳ Reclamatii
- ↳ Entertainment
- ↳ Distractie
- ↳ Clubul eXtreamCS - Intra si tu ! [noi oportunitati]
- eXtream - Counter-Strike 2
- ↳ Counter-Strike 2
- eXtream - Counter-Strike 1.6
- ↳ Diverse
- ↳ Filme gaming
- ↳ Meciuri
- ↳ Tutoriale
- ↳ Tutoriale
- ↳ Cereri
- ↳ Discutii generale
- ↳ Probleme la servere dedicate de Counter-Strike
- ↳ Cereri admin / slot
- ↳ Probleme in jocul Counter-Strike
- ↳ Pluginuri
- ↳ Pluginuri eXtream
- ↳ Cereri
- ↳ AdminMod
- ↳ AmxModX
- ↳ Resurse
- ↳ Moduri
- ↳ Addon-uri
- ↳ Kit-uri
- ↳ Harti
- ↳ Diverse
- ↳ Cereri
- ↳ Servere
- ↳ Programarea CS-ului
- ↳ Scripting
- ↳ Modificari pluginuri
- ↳ CStrike
- ↳ Cereri
- eXtream - Echipa
- ↳ Productia eXtream
- ↳ Harti eXtream
- ↳ CS.eXtreamCS.com - Server oficial eXtreamCS
- ↳ Zona administrativă
- ↳ Cereri acces
- ↳ Cereri unban
- ↳ Reclamații
- ↳ Admin zone
- ↳ CS2.eXtreamCS.com - Server official eXtreamCS
- ↳ XMAS.eXtreamCS.com
- ↳ Cereri admin
- ↳ Cereri unban
- ↳ Reclamatii / Sugestii
- ↳ eXtreamCS #PubMasters
- eXtream - Counter Strike Global Offensive
- ↳ Diverse
- ↳ Meciuri
- ↳ Tutoriale
- ↳ Probleme la servere dedicate de Counter-Strike: Global Offensive
- ↳ Probleme in jocul Counter-Strike: Global Offensive
- ↳ Pluginuri
- ↳ Cereri
- ↳ Resurse
- ↳ Addons-uri
- ↳ Hărți
- ↳ Diverse
- ↳ Servere
- eXtream - Counter-Strike Source
- ↳ Tutoriale
- ↳ Pluginuri
- ↳ Servere
- ↳ Resurse
- ↳ Harti
- ↳ Moduri
- ↳ Diverse
- ↳ Classic » CS
- ↳ Anunțuri administrative
- ↳ Cereri admin/slot
- ↳ Cereri unban
- ↳ Reclamații
- ↳ Banlist
- ↳ Admins Only
- ↳ Discord