Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <nvault>
- #include <engine>
- #include <cstrike>
- #define PLUGIN "Weapons Skins System"
- #define VERZIJA "1.4"
- #define AUTOR "Pićunak & Tibers"
- #define Prefiks "!g[!ySkins-System!g]"
- #define MaxLevel 520
- new bool:hud[33];
- const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0;
- new iCountUnlockLevel[33];
- new iCountIndividualKNIFE[33][11]; // A two-dimensional array to store the level of each knife for each player
- new model_knife[33];
- new iCountIndividualAWP[33][21]; // A two-dimensional array to store the level of each AWP for each player
- new model_awp[33];
- new iCountIndividualAK47[33][21]; // A two-dimensional array to store the level of each AK47 for each player
- new model_ak47[33];
- new iCountIndividualM4A1[33][21]; // A two-dimensional array to store the level of each M4A1 for each player
- new model_m4a1[33];
- new iCountIndividualDEAGLE[33][16]; // A two-dimensional array to store the level of each Deagle for each player
- new model_deagle[33];
- new iCountIndividualGLOCK18[33][11]; // A two-dimensional array to store the level of each Glock18 for each player
- new model_glock18[33];
- new iCountIndividualUSP[33][11]; // A two-dimensional array to store the level of each USP for each player
- new model_usp[33];
- enum SkinDataKNIFE
- {
- NameKNIFE,
- UnlockLevelKNIFE,
- V_KNIFE,
- P_KNIFE,
- IndividualLevelKNIFE
- };
- new const SkinsDataKNIFE[11][SkinDataKNIFE][] =
- {
- {"Karambit|Default", 0, "models/Skins-System/knives/v_knife_0.mdl", "models/Skins-System/knives/p_knife_0.mdl", 0},
- {"Karambit|Automatic Blue", 10, "models/Skins-System/knives/v_knife_1.mdl", "models/Skins-System/knives/p_knife_1.mdl", 0},
- {"Karambit|Case Hardened", 20, "models/Skins-System/knives/v_knife_2.mdl", "models/Skins-System/knives/p_knife_2.mdl", 0},
- {"Karambit|Fade", 15, "models/Skins-System/knives/v_knife_3.mdl", "models/Skins-System/knives/p_knife_3.mdl", 0},
- {"Karambit|Fever Dream", 40, "models/Skins-System/knives/v_knife_4.mdl", "models/Skins-System/knives/p_knife_4.mdl", 0},
- {"Karambit|Lore", 50, "models/Skins-System/knives/v_knife_5.mdl", "models/Skins-System/knives/p_knife_5.mdl", 0},
- {"Karambit|Paw", 60, "models/Skins-System/knives/v_knife_6.mdl", "models/Skins-System/knives/p_knife_6.mdl", 0},
- {"Karambit|Printstream 1", 70, "models/Skins-System/knives/v_knife_7.mdl", "models/Skins-System/knives/p_knife_7.mdl", 0},
- {"Karambit|Printstream 2", 80, "models/Skins-System/knives/v_knife_8.mdl", "models/Skins-System/knives/p_knife_8.mdl", 0},
- {"Karambit|Tiger Tooth", 90, "models/Skins-System/knives/v_knife_9.mdl", "models/Skins-System/knives/p_knife_9.mdl", 0},
- {"Karambit|Water Elemental", 100, "models/Skins-System/knives/v_knife_10.mdl", "models/Skins-System/knives/p_knife_10.mdl", 0}
- };
- enum SkinDataAWP
- {
- NameAWP,
- UnlockLevelAWP,
- V_AWP,
- P_AWP,
- IndividualLevelAWP
- };
- new const SkinsDataAWP[21][SkinDataAWP][] =
- {
- {"AWP|Default", 0, "models/Skins-System/awp/v_awp_0.mdl", "models/Skins-System/awp/p_awp_0.mdl", 0},
- {"AWP|Asiimov", 10, "models/Skins-System/awp/v_awp_1.mdl", "models/Skins-System/awp/p_awp_1.mdl", 0},
- {"AWP|Atheris", 20, "models/Skins-System/awp/v_awp_2.mdl", "models/Skins-System/awp/p_awp_2.mdl", 0},
- {"AWP|Bloodsport", 30, "models/Skins-System/awp/v_awp_3.mdl", "models/Skins-System/awp/p_awp_3.mdl", 0},
- {"AWP|Chromatic Aberration", 40, "models/Skins-System/awp/v_awp_4.mdl", "models/Skins-System/awp/p_awp_4.mdl", 0},
- {"AWP|Containment Breach", 50, "models/Skins-System/awp/v_awp_5.mdl", "models/Skins-System/awp/p_awp_5.mdl", 0},
- {"AWP|Desert Hydra", 60, "models/Skins-System/awp/v_awp_6.mdl", "models/Skins-System/awp/p_awp_6.mdl", 0},
- {"AWP|Dragon Lore", 70, "models/Skins-System/awp/v_awp_7.mdl", "models/Skins-System/awp/p_awp_7.mdl", 0},
- {"AWP|Fade", 80, "models/Skins-System/awp/v_awp_8.mdl", "models/Skins-System/awp/p_awp_8.mdl", 0},
- {"AWP|Fever Dream", 90, "models/Skins-System/awp/v_awp_9.mdl", "models/Skins-System/awp/p_awp_9.mdl", 0},
- {"AWP|Gungnir", 100, "models/Skins-System/awp/v_awp_10.mdl", "models/Skins-System/awp/p_awp_10.mdl", 0},
- {"AWP|Hyper Beast", 110, "models/Skins-System/awp/v_awp_11.mdl", "models/Skins-System/awp/p_awp_11.mdl", 0},
- {"AWP|Neo-Noir", 120, "models/Skins-System/awp/v_awp_12.mdl", "models/Skins-System/awp/p_awp_12.mdl", 0},
- {"AWP|Nightwish", 130, "models/Skins-System/awp/v_awp_13.mdl", "models/Skins-System/awp/p_awp_13.mdl", 0},
- {"AWP|Paw", 140, "models/Skins-System/awp/v_awp_14.mdl", "models/Skins-System/awp/p_awp_14.mdl", 0},
- {"AWP|Printstream", 150, "models/Skins-System/awp/v_awp_15.mdl", "models/Skins-System/awp/p_awp_15.mdl", 0},
- {"AWP|Slither", 160, "models/Skins-System/awp/v_awp_16.mdl", "models/Skins-System/awp/p_awp_16.mdl", 0},
- {"AWP|Smoke MID", 170, "models/Skins-System/awp/v_awp_17.mdl", "models/Skins-System/awp/p_awp_17.mdl", 0},
- {"AWP|SnowMan", 180, "models/Skins-System/awp/v_awp_18.mdl", "models/Skins-System/awp/p_awp_18.mdl", 0},
- {"AWP|The Empress", 190, "models/Skins-System/awp/v_awp_19.mdl", "models/Skins-System/awp/p_awp_19.mdl", 0},
- {"AWP|The Prince", 200, "models/Skins-System/awp/v_awp_20.mdl", "models/Skins-System/awp/p_awp_20.mdl", 0}
- };
- enum SkinDataAK47
- {
- NameAK47,
- UnlockLevelAK47,
- V_AK47,
- P_AK47,
- IndividualLevelAK47
- };
- new const SkinsDataAK47[21][SkinDataAK47][] =
- {
- {"AK-47|Default", 0, "models/Skins-System/ak47/v_ak47_0.mdl", "models/Skins-System/ak47/p_ak47_0.mdl", 0},
- {"AK-47|Asiimov", 10, "models/Skins-System/ak47/v_ak47_1.mdl", "models/Skins-System/ak47/p_ak47_1.mdl", 0},
- {"AK-47|Bloodsport", 20, "models/Skins-System/ak47/v_ak47_2.mdl", "models/Skins-System/ak47/p_ak47_2.mdl", 0},
- {"AK-47|Cartel", 30, "models/Skins-System/ak47/v_ak47_3.mdl", "models/Skins-System/ak47/p_ak47_3.mdl", 0},
- {"AK-47|Chromatic Aberration", 40, "models/Skins-System/ak47/v_ak47_4.mdl", "models/Skins-System/ak47/p_ak47_4.mdl", 0},
- {"AK-47|Dragon Lore", 50, "models/Skins-System/ak47/v_ak47_5.mdl", "models/Skins-System/ak47/p_ak47_5.mdl", 0},
- {"AK-47|Fade", 60, "models/Skins-System/ak47/v_ak47_6.mdl", "models/Skins-System/ak47/p_ak47_6.mdl", 0},
- {"AK-47|Fallen Warrior", 70, "models/Skins-System/ak47/v_ak47_7.mdl", "models/Skins-System/ak47/p_ak47_7.mdl", 0},
- {"AK-47|Fire Serpent", 80, "models/Skins-System/ak47/v_ak47_8.mdl", "models/Skins-System/ak47/p_ak47_8.mdl", 0},
- {"AK-47|Ice Coaled", 90, "models/Skins-System/ak47/v_ak47_9.mdl", "models/Skins-System/ak47/p_ak47_9.mdl", 0},
- {"AK-47|Leet Museo", 100, "models/Skins-System/ak47/v_ak47_10.mdl", "models/Skins-System/ak47/p_ak47_10.mdl", 0},
- {"AK-47|Master Kush", 110, "models/Skins-System/ak47/v_ak47_11.mdl", "models/Skins-System/ak47/p_ak47_11.mdl", 0},
- {"AK-47|Neon Revolution", 120, "models/Skins-System/ak47/v_ak47_12.mdl", "models/Skins-System/ak47/p_ak47_12.mdl", 0},
- {"AK-47|Neon Rider", 130, "models/Skins-System/ak47/v_ak47_13.mdl", "models/Skins-System/ak47/p_ak47_13.mdl", 0},
- {"AK-47|Nightwish", 140, "models/Skins-System/ak47/v_ak47_14.mdl", "models/Skins-System/ak47/p_ak47_14.mdl", 0},
- {"AK-47|Panthera onca", 150, "models/Skins-System/ak47/v_ak47_15.mdl", "models/Skins-System/ak47/p_ak47_15.mdl", 0},
- {"AK-47|Printstream", 160, "models/Skins-System/ak47/v_ak47_16.mdl", "models/Skins-System/ak47/p_ak47_16.mdl", 0},
- {"AK-47|Smoke MID", 170, "models/Skins-System/ak47/v_ak47_17.mdl", "models/Skins-System/ak47/p_ak47_17.mdl", 0},
- {"AK-47|The Empress", 180, "models/Skins-System/ak47/v_ak47_18.mdl", "models/Skins-System/ak47/p_ak47_18.mdl", 0},
- {"AK-47|Wild Lotus", 190, "models/Skins-System/ak47/v_ak47_19.mdl", "models/Skins-System/ak47/p_ak47_19.mdl", 0},
- {"AK-47|Wolverine", 200, "models/Skins-System/ak47/v_ak47_20.mdl", "models/Skins-System/ak47/p_ak47_20.mdl", 0}
- };
- enum SkinDataM4A1
- {
- NameM4A1,
- UnlockLevelM4A1,
- V_M4A1,
- P_M4A1,
- IndividualLevelM4A1
- };
- new const SkinsDataM4A1[21][SkinDataM4A1][] =
- {
- {"M4A1-S|Default", 0, "models/Skins-System/m4a1/v_m4a1_0.mdl", "models/Skins-System/m4a1/p_m4a1_0.mdl", 0},
- {"M4A1-S|Bloodsport", 10, "models/Skins-System/m4a1/v_m4a1_1.mdl", "models/Skins-System/m4a1/p_m4a1_1.mdl", 0},
- {"M4A1-S|Chantico's Fire", 20, "models/Skins-System/m4a1/v_m4a1_2.mdl", "models/Skins-System/m4a1/p_m4a1_2.mdl", 0},
- {"M4A1-S|Chromatic Aberration", 30, "models/Skins-System/m4a1/v_m4a1_3.mdl", "models/Skins-System/m4a1/p_m4a1_3.mdl", 0},
- {"M4A1-S|Control Panel", 40, "models/Skins-System/m4a1/v_m4a1_4.mdl", "models/Skins-System/m4a1/p_m4a1_4.mdl", 0},
- {"M4A1-S|Cutter", 50, "models/Skins-System/m4a1/v_m4a1_5.mdl", "models/Skins-System/m4a1/p_m4a1_5.mdl", 0},
- {"M4A1-S|Decimator", 60, "models/Skins-System/m4a1/v_m4a1_6.mdl", "models/Skins-System/m4a1/p_m4a1_6.mdl", 0},
- {"M4A1-S|Dragon Lore", 70, "models/Skins-System/m4a1/v_m4a1_7.mdl", "models/Skins-System/m4a1/p_m4a1_7.mdl", 0},
- {"M4A1-S|Flashback", 80, "models/Skins-System/m4a1/v_m4a1_8.mdl", "models/Skins-System/m4a1/p_m4a1_8.mdl", 0},
- {"M4A1-S|Golden Coil", 90, "models/Skins-System/m4a1/v_m4a1_9.mdl", "models/Skins-System/m4a1/p_m4a1_9.mdl", 0},
- {"M4A1-S|Hyper Beast", 100, "models/Skins-System/m4a1/v_m4a1_10.mdl", "models/Skins-System/m4a1/p_m4a1_10.mdl", 0},
- {"M4A1-S|Imminent Danger", 110, "models/Skins-System/m4a1/v_m4a1_11.mdl", "models/Skins-System/m4a1/p_m4a1_11.mdl", 0},
- {"M4A1-S|Kill Confirmed", 120, "models/Skins-System/m4a1/v_m4a1_12.mdl", "models/Skins-System/m4a1/p_m4a1_12.mdl", 0},
- {"M4A1-S|Light Of King", 130, "models/Skins-System/m4a1/v_m4a1_13.mdl", "models/Skins-System/m4a1/p_m4a1_13.mdl", 0},
- {"M4A1-S|Marble Fade", 140, "models/Skins-System/m4a1/v_m4a1_14.mdl", "models/Skins-System/m4a1/p_m4a1_14.mdl", 0},
- {"M4A1-S|Mecha Industries", 150, "models/Skins-System/m4a1/v_m4a1_15.mdl", "models/Skins-System/m4a1/p_m4a1_15.mdl", 0},
- {"M4A1-S|Neo-Noir", 160, "models/Skins-System/m4a1/v_m4a1_16.mdl", "models/Skins-System/m4a1/p_m4a1_16.mdl", 0},
- {"M4A1-S|Nightmare", 170, "models/Skins-System/m4a1/v_m4a1_17.mdl", "models/Skins-System/m4a1/p_m4a1_17.mdl", 0},
- {"M4A1-S|Player Two", 180, "models/Skins-System/m4a1/v_m4a1_18.mdl", "models/Skins-System/m4a1/p_m4a1_18.mdl", 0},
- {"M4A1-S|Printstream", 190, "models/Skins-System/m4a1/v_m4a1_19.mdl", "models/Skins-System/m4a1/p_m4a1_19.mdl", 0},
- {"M4A1-S|Welcome to the Jungle", 200, "models/Skins-System/m4a1/v_m4a1_20.mdl", "models/Skins-System/m4a1/p_m4a1_20.mdl", 0}
- };
- enum SkinDataDEAGLE
- {
- NameDEAGLE,
- UnlockLevelDEAGLE,
- V_DEAGLE,
- P_DEAGLE,
- IndividualLevelDEAGLE
- };
- new const SkinsDataDEAGLE[16][SkinDataDEAGLE][] =
- {
- {"DEAGLE|Default", 0, "models/Skins-System/deagle/v_deagle_0.mdl", "models/Skins-System/deagle/p_deagle_0.mdl", 0},
- {"DEAGLE|Bloodsport", 10, "models/Skins-System/deagle/v_deagle_1.mdl", "models/Skins-System/deagle/p_deagle_1.mdl", 0},
- {"DEAGLE|Blue Polygon", 20, "models/Skins-System/deagle/v_deagle_2.mdl", "models/Skins-System/deagle/p_deagle_2.mdl", 0},
- {"DEAGLE|Chromatic Aberration", 30, "models/Skins-System/deagle/v_deagle_3.mdl", "models/Skins-System/deagle/p_deagle_3.mdl", 0},
- {"DEAGLE|Code Red", 40, "models/Skins-System/deagle/v_deagle_4.mdl", "models/Skins-System/deagle/p_deagle_4.mdl", 0},
- {"DEAGLE|Dragon Lore", 50, "models/Skins-System/deagle/v_deagle_5.mdl", "models/Skins-System/deagle/p_deagle_5.mdl", 0},
- {"DEAGLE|Fade", 60, "models/Skins-System/deagle/v_deagle_6.mdl", "models/Skins-System/deagle/p_deagle_6.mdl", 0},
- {"DEAGLE|Fennec Fox", 70, "models/Skins-System/deagle/v_deagle_7.mdl", "models/Skins-System/deagle/p_deagle_7.mdl", 0},
- {"DEAGLE|HS Level", 80, "models/Skins-System/deagle/v_deagle_8.mdl", "models/Skins-System/deagle/p_deagle_8.mdl", 0},
- {"DEAGLE|Kill Confirmed", 90, "models/Skins-System/deagle/v_deagle_9.mdl", "models/Skins-System/deagle/p_deagle_9.mdl", 0},
- {"DEAGLE|Kumicho Dragon", 100, "models/Skins-System/deagle/v_deagle_10.mdl", "models/Skins-System/deagle/p_deagle_10.mdl", 0},
- {"DEAGLE|Mecha Industries", 110, "models/Skins-System/deagle/v_deagle_11.mdl", "models/Skins-System/deagle/p_deagle_11.mdl", 0},
- {"DEAGLE|Ocean Drive", 120, "models/Skins-System/deagle/v_deagle_12.mdl", "models/Skins-System/deagle/p_deagle_12.mdl", 0},
- {"DEAGLE|Oxide Blaze", 130, "models/Skins-System/deagle/v_deagle_13.mdl", "models/Skins-System/deagle/p_deagle_13.mdl", 0},
- {"DEAGLE|Prinstream", 140, "models/Skins-System/deagle/v_deagle_14.mdl", "models/Skins-System/deagle/p_deagle_14.mdl", 0},
- {"DEAGLE|Trigger Discipline", 150, "models/Skins-System/deagle/v_deagle_15.mdl", "models/Skins-System/deagle/p_deagle_15.mdl", 0}
- };
- enum SkinDataGLOCK18
- {
- NameGLOCK18,
- UnlockLevelGLOCK18,
- V_GLOCK18,
- P_GLOCK18,
- IndividualLevelGLOCK18
- };
- new const SkinsDataGLOCK18[11][SkinDataGLOCK18][] =
- {
- {"GLOCK-18|Default", 0, "models/Skins-System/glock18/v_glock18_0.mdl", "models/Skins-System/glock18/p_glock18_0.mdl", 0},
- {"GLOCK-18|Bullet Queen", 10, "models/Skins-System/glock18/v_glock18_1.mdl", "models/Skins-System/glock18/p_glock18_1.mdl", 0},
- {"GLOCK-18|Chromatic Aberration", 20, "models/Skins-System/glock18/v_glock18_2.mdl", "models/Skins-System/glock18/p_glock18_2.mdl", 0},
- {"GLOCK-18|Eagle", 30, "models/Skins-System/glock18/v_glock18_3.mdl", "models/Skins-System/glock18/p_glock18_3.mdl", 0},
- {"GLOCK-18|Fade", 40, "models/Skins-System/glock18/v_glock18_4.mdl", "models/Skins-System/glock18/p_glock18_4.mdl", 0},
- {"GLOCK-18|Hornet", 50, "models/Skins-System/glock18/v_glock18_5.mdl", "models/Skins-System/glock18/p_glock18_5.mdl", 0},
- {"GLOCK-18|Neo-Noir", 60, "models/Skins-System/glock18/v_glock18_6.mdl", "models/Skins-System/glock18/p_glock18_6.mdl", 0},
- {"GLOCK-18|Sacrifice", 70, "models/Skins-System/glock18/v_glock18_7.mdl", "models/Skins-System/glock18/p_glock18_7.mdl", 0},
- {"GLOCK-18|Vogue", 80, "models/Skins-System/glock18/v_glock18_8.mdl", "models/Skins-System/glock18/p_glock18_8.mdl", 0},
- {"GLOCK-18|Water Elemental", 90, "models/Skins-System/glock18/v_glock18_9.mdl", "models/Skins-System/glock18/p_glock18_9.mdl", 0},
- {"GLOCK-18|Weasel", 100, "models/Skins-System/glock18/v_glock18_10.mdl", "models/Skins-System/glock18/p_glock18_10.mdl", 0}
- };
- enum SkinDataUSP
- {
- NameUSP,
- UnlockLevelUSP,
- V_USP,
- P_USP,
- IndividualLevelUSP
- };
- new const SkinsDataUSP[11][SkinDataUSP][] =
- {
- {"USP-S|Default", 0, "models/Skins-System/usp/v_usp_0.mdl", "models/Skins-System/usp/p_usp_0.mdl", 0},
- {"USP-S|Bloodsport", 10, "models/Skins-System/usp/v_usp_1.mdl", "models/Skins-System/usp/p_usp_1.mdl", 0},
- {"USP-S|Burnished", 20, "models/Skins-System/usp/v_usp_2.mdl", "models/Skins-System/usp/p_usp_2.mdl", 0},
- {"USP-S|Chromatic Aberration", 30, "models/Skins-System/usp/v_usp_3.mdl", "models/Skins-System/usp/p_usp_3.mdl", 0},
- {"USP-S|Cortex", 40, "models/Skins-System/usp/v_usp_4.mdl", "models/Skins-System/usp/p_usp_4.mdl", 0},
- {"USP-S|Flashback", 50, "models/Skins-System/usp/v_usp_5.mdl", "models/Skins-System/usp/p_usp_5.mdl", 0},
- {"USP-S|Kill Confirmed", 60, "models/Skins-System/usp/v_usp_6.mdl", "models/Skins-System/usp/p_usp_6.mdl", 0},
- {"USP-S|Neo-Noir", 70, "models/Skins-System/usp/v_usp_7.mdl", "models/Skins-System/usp/p_usp_7.mdl", 0},
- {"USP-S|Printstream", 80, "models/Skins-System/usp/v_usp_8.mdl", "models/Skins-System/usp/p_usp_8.mdl", 0},
- {"USP-S|Revenge is Sweet", 90, "models/Skins-System/usp/v_usp_9.mdl", "models/Skins-System/usp/p_usp_9.mdl", 0},
- {"USP-S|The Traitor", 100, "models/Skins-System/usp/v_usp_10.mdl", "models/Skins-System/usp/p_usp_10.mdl", 0}
- };
- new g_msgsync;
- new g_Vault;
- public plugin_precache()
- {
- // Precache for SkinsDataKNIFE
- for (new i = 0; i < sizeof(SkinsDataKNIFE); i++)
- {
- precache_model(SkinsDataKNIFE[i][V_KNIFE]);
- precache_model(SkinsDataKNIFE[i][P_KNIFE]);
- }
- // Precache for SkinsDataAWP
- for (new i = 0; i < sizeof(SkinsDataAWP); i++)
- {
- precache_model(SkinsDataAWP[i][V_AWP]);
- precache_model(SkinsDataAWP[i][P_AWP]);
- }
- // Precache for SkinsDataAK47
- for (new i = 0; i < sizeof(SkinsDataAK47); i++)
- {
- precache_model(SkinsDataAK47[i][V_AK47]);
- precache_model(SkinsDataAK47[i][P_AK47]);
- }
- // Precache for SkinsDataM4A1
- for (new i = 0; i < sizeof(SkinsDataM4A1); i++)
- {
- precache_model(SkinsDataM4A1[i][V_M4A1]);
- precache_model(SkinsDataM4A1[i][P_M4A1]);
- }
- // Precache for SkinsDataDEAGLE
- for (new i = 0; i < sizeof(SkinsDataDEAGLE); i++)
- {
- precache_model(SkinsDataDEAGLE[i][V_DEAGLE]);
- precache_model(SkinsDataDEAGLE[i][P_DEAGLE]);
- }
- // Precache for SkinsDataGLOCK18
- for (new i = 0; i < sizeof(SkinsDataGLOCK18); i++)
- {
- precache_model(SkinsDataGLOCK18[i][V_GLOCK18]);
- precache_model(SkinsDataGLOCK18[i][P_GLOCK18]);
- }
- // Precache for SkinsDataUSP
- for (new i = 0; i < sizeof(SkinsDataUSP); i++)
- {
- precache_model(SkinsDataUSP[i][V_USP]);
- precache_model(SkinsDataUSP[i][P_USP]);
- }
- }
- public plugin_init()
- {
- register_plugin(PLUGIN, VERZIJA, AUTOR);
- register_clcmd("say /knife", "ChangeKnife");
- register_clcmd("say_team /knife", "ChangeKnife");
- register_clcmd("say /awp", "ChangeAwp");
- register_clcmd("say_team /awp", "ChangeAwp");
- register_clcmd("say /ak47", "ChangeAk47");
- register_clcmd("say_team /ak47", "ChangeAk47");
- register_clcmd("say /m4a1", "ChangeM4a1");
- register_clcmd("say_team /m4a1", "ChangeM4a1");
- register_clcmd("say /deagle", "ChangeDeagle");
- register_clcmd("say_team /deagle", "ChangeDeagle");
- register_clcmd("say /glock18", "ChangeGlock18");
- register_clcmd("say_team /glock18", "ChangeGlock18");
- register_clcmd("say /usp", "ChangeUsp");
- register_clcmd("say_team /usp", "ChangeUsp");
- register_concmd("give_level", "amx_addlevel", ADMIN_RCON, "<nick> <num> - Adds levels to a player.");
- register_concmd("set_level", "amx_setlevel", ADMIN_RCON, "<nick> <num> - Sets levels for players.");
- register_event("DeathMsg", "CountLevelUnlock", "a");
- register_event("DeathMsg", "CountIndividual", "a", "1>0", "1!2");
- register_event("CurWeapon", "CurWeapon", "be", "1=1");
- register_menu("Weapons Skins", KEYSMENU, "weapons_skins");
- register_clcmd("nightvision", "WeaponSkins");
- register_clcmd("say /skins", "WeaponSkins");
- register_clcmd("say /hudk", "ToggleHud"); // Calls ToggleHud on the "/hudk" command
- g_msgsync = CreateHudSyncObj();
- g_Vault = nvault_open("SkinsSystem");
- }
- public client_disconnected(id)
- {
- // Save player data when disconnected
- SaveData(id);
- remove_task(id);
- }
- // Function called when a client is authorized
- public client_authorized(id)
- {
- // Load player data when authorized
- LoadData(id);
- set_task(1.0, "show_hud", id, _, _, "b");
- }
- public show_hud(id) {
- if (!hud[id]) {
- if (is_user_alive(id)) {
- set_hudmessage(0, 127, 255, -1.0, 0.85, 0, 6.0, 1.2);
- if (get_user_weapon(id) == CSW_KNIFE) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataKNIFE[model_knife[id]][NameKNIFE], iCountIndividualKNIFE[id][model_knife[id]]);
- } else if (get_user_weapon(id) == CSW_AWP) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataAWP[model_awp[id]][NameAWP], iCountIndividualAWP[id][model_awp[id]]);
- } else if (get_user_weapon(id) == CSW_AK47) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataAK47[model_ak47[id]][NameAK47], iCountIndividualAK47[id][model_ak47[id]]);
- } else if (get_user_weapon(id) == CSW_M4A1) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataM4A1[model_m4a1[id]][NameM4A1], iCountIndividualM4A1[id][model_m4a1[id]]);
- } else if (get_user_weapon(id) == CSW_DEAGLE) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataDEAGLE[model_deagle[id]][NameDEAGLE], iCountIndividualDEAGLE[id][model_deagle[id]]);
- } else if (get_user_weapon(id) == CSW_GLOCK18) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataGLOCK18[model_glock18[id]][NameGLOCK18], iCountIndividualGLOCK18[id][model_glock18[id]]);
- } else if (get_user_weapon(id) == CSW_USP) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataUSP[model_usp[id]][NameUSP], iCountIndividualUSP[id][model_usp[id]]);
- }
- } else {
- new SpecPlayer = entity_get_int(id, EV_INT_iuser2);
- if (is_user_alive(SpecPlayer)) {
- set_hudmessage(0, 127, 255, -1.0, 0.85, 0, 6.0, 1.1);
- if (get_user_weapon(SpecPlayer) == CSW_KNIFE) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataKNIFE[model_knife[SpecPlayer]][NameKNIFE], iCountIndividualKNIFE[SpecPlayer][model_knife[SpecPlayer]]);
- } else if (get_user_weapon(SpecPlayer) == CSW_AWP) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataAWP[model_awp[SpecPlayer]][NameAWP], iCountIndividualAWP[SpecPlayer][model_awp[SpecPlayer]]);
- } else if (get_user_weapon(SpecPlayer) == CSW_AK47) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataAK47[model_ak47[SpecPlayer]][NameAK47], iCountIndividualAK47[SpecPlayer][model_ak47[SpecPlayer]]);
- } else if (get_user_weapon(SpecPlayer) == CSW_M4A1) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataM4A1[model_m4a1[SpecPlayer]][NameM4A1], iCountIndividualM4A1[SpecPlayer][model_m4a1[SpecPlayer]]);
- } else if (get_user_weapon(SpecPlayer) == CSW_DEAGLE) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataDEAGLE[model_deagle[SpecPlayer]][NameDEAGLE], iCountIndividualDEAGLE[SpecPlayer][model_deagle[SpecPlayer]]);
- } else if (get_user_weapon(SpecPlayer) == CSW_GLOCK18) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataGLOCK18[model_glock18[SpecPlayer]][NameGLOCK18], iCountIndividualGLOCK18[SpecPlayer][model_glock18[SpecPlayer]]);
- } else if (get_user_weapon(SpecPlayer) == CSW_USP) {
- ShowSyncHudMsg(id, g_msgsync, "%s^n%d confirmed kills", SkinsDataUSP[model_usp[SpecPlayer]][NameUSP], iCountIndividualUSP[SpecPlayer][model_usp[SpecPlayer]]);
- }
- }
- }
- }
- }
- public CurWeapon(id)
- {
- SetSkinKNIFE(id, model_knife[id]);
- SetSkinAWP(id, model_awp[id]);
- SetSkinAK47(id, model_ak47[id]);
- SetSkinM4A1(id, model_m4a1[id]);
- SetSkinDEAGLE(id, model_deagle[id]);
- SetSkinGLOCK18(id, model_glock18[id]);
- SetSkinUSP(id, model_usp[id]);
- }
- //ChangeKnife-START=========================================================================================================================
- public ChangeKnife(id)
- {
- if(!is_user_connected(id))
- return PLUGIN_HANDLED;
- new menu = menu_create("Choose your KNIFE skin" , "select_knife_handler");
- new MenuKNIFE[256];
- for (new i = 0; i < sizeof(SkinsDataKNIFE); i++)
- {
- if(iCountUnlockLevel[id] < SkinsDataKNIFE[i][UnlockLevelKNIFE][0])
- {
- formatex(MenuKNIFE, charsmax(MenuKNIFE), "%s \r[Level %i/%i]", SkinsDataKNIFE[i][NameKNIFE], iCountUnlockLevel[id], SkinsDataKNIFE[i][UnlockLevelKNIFE]);
- }
- else
- formatex(MenuKNIFE, charsmax(MenuKNIFE), "%s \y[Unlocked] [Level %i]", SkinsDataKNIFE[i][NameKNIFE], iCountIndividualKNIFE[id][i]);
- menu_additem(menu, MenuKNIFE);
- }
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
- menu_setprop(menu, MPROP_BACKNAME, "Previous page");
- menu_setprop(menu, MPROP_NEXTNAME, "Next page");
- menu_setprop(menu, MPROP_EXITNAME, "Exit");
- menu_display(id, menu);
- return PLUGIN_HANDLED;
- }
- public select_knife_handler(id, menu, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- if(item == model_knife[id])
- {
- ColorChat(id, "%s !yYou already use !gKNIFE !yskin!g %s", Prefiks, SkinsDataKNIFE[item][NameKNIFE]);
- return PLUGIN_HANDLED;
- }
- new command[6], name[64], access, callback;
- menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
- if(iCountUnlockLevel[id] < SkinsDataKNIFE[item][UnlockLevelKNIFE][0])
- ColorChat(id, "%s !yYou don't have the required level to use!g %s !yskin.", Prefiks, SkinsDataKNIFE[item][NameKNIFE]);
- else
- {
- SetSkinKNIFE(id, item);
- ColorChat(id, "%s !yYou set !gKNIFE !yskin!g %s", Prefiks, SkinsDataKNIFE[item][NameKNIFE]);
- }
- SaveData(id);
- ChangeKnife(id);
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- SetSkinKNIFE(id , KNIFE)
- {
- model_knife[id] = KNIFE;
- new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo);
- if(Weapon != CSW_KNIFE)
- return PLUGIN_HANDLED;
- new vModel[56];
- new pModel[56];
- format(vModel, 55, SkinsDataKNIFE[KNIFE][V_KNIFE]);
- format(pModel, 55, SkinsDataKNIFE[KNIFE][P_KNIFE]);
- entity_set_string(id, EV_SZ_viewmodel, vModel);
- entity_set_string(id, EV_SZ_weaponmodel, pModel);
- return PLUGIN_HANDLED;
- }
- //ChangeKnife-END=========================================================================================================================
- //ChangeAwp-START=========================================================================================================================
- public ChangeAwp(id)
- {
- if(!is_user_connected(id))
- return PLUGIN_HANDLED;
- new menu = menu_create("Choose your AWP skin" , "select_awp_handler");
- new MenuAWP[256];
- for (new i = 0; i < sizeof(SkinsDataAWP); i++)
- {
- if(iCountUnlockLevel[id] < SkinsDataAWP[i][UnlockLevelAWP][0])
- {
- formatex(MenuAWP, charsmax(MenuAWP), "%s \r[Level %i/%i]", SkinsDataAWP[i][NameAWP], iCountUnlockLevel[id], SkinsDataAWP[i][UnlockLevelAWP]);
- }
- else
- formatex(MenuAWP, charsmax(MenuAWP), "%s \y[Unlocked] [Level %i]", SkinsDataAWP[i][NameAWP], iCountIndividualAWP[id][i]);
- menu_additem(menu, MenuAWP);
- }
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
- menu_setprop(menu, MPROP_BACKNAME, "Previous page");
- menu_setprop(menu, MPROP_NEXTNAME, "Next page");
- menu_setprop(menu, MPROP_EXITNAME, "Exit");
- menu_display(id, menu);
- return PLUGIN_HANDLED;
- }
- public select_awp_handler(id, menu, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- if(item == model_awp[id])
- {
- ColorChat(id, "%s !yYou already use!g AWP !yskin!g %s", Prefiks, SkinsDataAWP[item][NameAWP]);
- return PLUGIN_HANDLED;
- }
- new command[6], name[64], access, callback;
- menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
- if(iCountUnlockLevel[id] < SkinsDataAWP[item][UnlockLevelAWP][0])
- ColorChat(id, "%s !yYou don't have the required level to use!g %s !yskin.", Prefiks, SkinsDataAWP[item][NameAWP]);
- else
- {
- SetSkinAWP(id, item);
- ColorChat(id, "%s !yYou set!g AWP !yskin!g %s", Prefiks, SkinsDataAWP[item][NameAWP]);
- }
- SaveData(id);
- ChangeAwp(id);
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- SetSkinAWP(id , AWP)
- {
- model_awp[id] = AWP;
- new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo);
- if(Weapon != CSW_AWP)
- return PLUGIN_HANDLED;
- new vModel[56];
- new pModel[56];
- format(vModel, 55, SkinsDataAWP[AWP][V_AWP]);
- format(pModel, 55, SkinsDataAWP[AWP][P_AWP]);
- entity_set_string(id, EV_SZ_viewmodel, vModel);
- entity_set_string(id, EV_SZ_weaponmodel, pModel);
- return PLUGIN_HANDLED;
- }
- //ChangeAwp-END=========================================================================================================================
- //ChangeAk47-START=========================================================================================================================
- public ChangeAk47(id)
- {
- if(!is_user_connected(id))
- return PLUGIN_HANDLED;
- new menu = menu_create("Choose your AK47 skin" , "select_ak47_handler");
- new MenuAK47[256];
- for (new i = 0; i < sizeof(SkinsDataAK47); i++)
- {
- if(iCountUnlockLevel[id] < SkinsDataAK47[i][UnlockLevelAK47][0])
- {
- formatex(MenuAK47, charsmax(MenuAK47), "%s \r[Level %i/%i]", SkinsDataAK47[i][NameAK47], iCountUnlockLevel[id], SkinsDataAK47[i][UnlockLevelAK47]);
- }
- else
- formatex(MenuAK47, charsmax(MenuAK47), "%s \y[Unlocked] [Level %i]", SkinsDataAK47[i][NameAK47], iCountIndividualAK47[id][i]);
- menu_additem(menu, MenuAK47);
- }
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
- menu_setprop(menu, MPROP_BACKNAME, "Previous page");
- menu_setprop(menu, MPROP_NEXTNAME, "Next page");
- menu_setprop(menu, MPROP_EXITNAME, "Exit");
- menu_display(id, menu);
- return PLUGIN_HANDLED;
- }
- public select_ak47_handler(id, menu, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- if(item == model_ak47[id])
- {
- ColorChat(id, "%s !yYou already use!g AK47 !yskin!g %s", Prefiks, SkinsDataAK47[item][NameAK47]);
- return PLUGIN_HANDLED;
- }
- new command[6], name[64], access, callback;
- menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
- if(iCountUnlockLevel[id] < SkinsDataAK47[item][UnlockLevelAK47][0])
- ColorChat(id, "%s !yYou don't have the required level to use!g %s !yskin.", Prefiks, SkinsDataAK47[item][NameAK47]);
- else
- {
- SetSkinAK47(id, item);
- ColorChat(id, "%s !yYou set!g AK47 !yskin!g %s", Prefiks, SkinsDataAK47[item][NameAK47]);
- }
- SaveData(id);
- ChangeAk47(id);
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- SetSkinAK47(id , AK47)
- {
- model_ak47[id] = AK47;
- new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo);
- if(Weapon != CSW_AK47)
- return PLUGIN_HANDLED;
- new vModel[56];
- new pModel[56];
- format(vModel, 55, SkinsDataAK47[AK47][V_AK47]);
- format(pModel, 55, SkinsDataAK47[AK47][P_AK47]);
- entity_set_string(id, EV_SZ_viewmodel, vModel);
- entity_set_string(id, EV_SZ_weaponmodel, pModel);
- return PLUGIN_HANDLED;
- }
- //ChangeAk47-END=========================================================================================================================
- //ChangeM4a1-START=========================================================================================================================
- public ChangeM4a1(id)
- {
- if(!is_user_connected(id))
- return PLUGIN_HANDLED;
- new menu = menu_create("Choose your M4A1 skin" , "select_m4a1_handler");
- new MenuM4A1[256];
- for (new i = 0; i < sizeof(SkinsDataM4A1); i++)
- {
- if(iCountUnlockLevel[id] < SkinsDataM4A1[i][UnlockLevelM4A1][0])
- {
- formatex(MenuM4A1, charsmax(MenuM4A1), "%s \r[Level %i/%i]", SkinsDataM4A1[i][NameM4A1], iCountUnlockLevel[id], SkinsDataM4A1[i][UnlockLevelM4A1]);
- }
- else
- formatex(MenuM4A1, charsmax(MenuM4A1), "%s \y[Unlocked] [Level %i]", SkinsDataM4A1[i][NameM4A1], iCountIndividualM4A1[id][i]);
- menu_additem(menu, MenuM4A1);
- }
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
- menu_setprop(menu, MPROP_BACKNAME, "Previous page");
- menu_setprop(menu, MPROP_NEXTNAME, "Next page");
- menu_setprop(menu, MPROP_EXITNAME, "Exit");
- menu_display(id, menu);
- return PLUGIN_HANDLED;
- }
- public select_m4a1_handler(id, menu, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- if(item == model_m4a1[id])
- {
- ColorChat(id, "%s !yYou already use!g M4A1 !yskin!g %s", Prefiks, SkinsDataM4A1[item][NameM4A1]);
- return PLUGIN_HANDLED;
- }
- new command[6], name[64], access, callback;
- menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
- if(iCountUnlockLevel[id] < SkinsDataM4A1[item][UnlockLevelM4A1][0])
- ColorChat(id, "%s !yYou don't have the required level to use!g %s !yskin.", Prefiks, SkinsDataM4A1[item][NameM4A1]);
- else
- {
- SetSkinM4A1(id, item);
- ColorChat(id, "%s !yYou set!g M4A1 !yskin!g %s", Prefiks, SkinsDataM4A1[item][NameM4A1]);
- }
- SaveData(id);
- ChangeM4a1(id);
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- SetSkinM4A1(id , M4A1)
- {
- model_m4a1[id] = M4A1;
- new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo);
- if(Weapon != CSW_M4A1)
- return PLUGIN_HANDLED;
- new vModel[56];
- new pModel[56];
- format(vModel, 55, SkinsDataM4A1[M4A1][V_M4A1]);
- format(pModel, 55, SkinsDataM4A1[M4A1][P_M4A1]);
- entity_set_string(id, EV_SZ_viewmodel, vModel);
- entity_set_string(id, EV_SZ_weaponmodel, pModel);
- return PLUGIN_HANDLED;
- }
- //ChangeM4a1-END=========================================================================================================================
- //ChangeDeagle-START=========================================================================================================================
- public ChangeDeagle(id)
- {
- if(!is_user_connected(id))
- return PLUGIN_HANDLED;
- new menu = menu_create("Choose your DEAGLE skin" , "select_deagle_handler");
- new MenuDEAGLE[256];
- for (new i = 0; i < sizeof(SkinsDataDEAGLE); i++)
- {
- if(iCountUnlockLevel[id] < SkinsDataDEAGLE[i][UnlockLevelDEAGLE][0])
- {
- formatex(MenuDEAGLE, charsmax(MenuDEAGLE), "%s \r[Level %i/%i]", SkinsDataDEAGLE[i][NameDEAGLE], iCountUnlockLevel[id], SkinsDataDEAGLE[i][UnlockLevelDEAGLE]);
- }
- else
- formatex(MenuDEAGLE, charsmax(MenuDEAGLE), "%s \y[Unlocked] [Level %i]", SkinsDataDEAGLE[i][NameDEAGLE], iCountIndividualDEAGLE[id][i]);
- menu_additem(menu, MenuDEAGLE);
- }
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
- menu_setprop(menu, MPROP_BACKNAME, "Previous page");
- menu_setprop(menu, MPROP_NEXTNAME, "Next page");
- menu_setprop(menu, MPROP_EXITNAME, "Exit");
- menu_display(id, menu);
- return PLUGIN_HANDLED;
- }
- public select_deagle_handler(id, menu, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- if(item == model_deagle[id])
- {
- ColorChat(id, "%s !yYou already use!g DEAGLE !yskin!g %s", Prefiks, SkinsDataDEAGLE[item][NameDEAGLE]);
- return PLUGIN_HANDLED;
- }
- new command[6], name[64], access, callback;
- menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
- if(iCountUnlockLevel[id] < SkinsDataDEAGLE[item][UnlockLevelDEAGLE][0])
- ColorChat(id, "%s !yYou don't have the required level to use!g %s !yskin.", Prefiks, SkinsDataDEAGLE[item][NameDEAGLE]);
- else
- {
- SetSkinDEAGLE(id, item);
- ColorChat(id, "%s !yYou set!g DEAGLE !yskin!g %s", Prefiks, SkinsDataDEAGLE[item][NameDEAGLE]);
- }
- SaveData(id);
- ChangeDeagle(id);
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- SetSkinDEAGLE(id , DEAGLE)
- {
- model_deagle[id] = DEAGLE;
- new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo);
- if(Weapon != CSW_DEAGLE)
- return PLUGIN_HANDLED;
- new vModel[56];
- new pModel[56];
- format(vModel, 55, SkinsDataDEAGLE[DEAGLE][V_DEAGLE]);
- format(pModel, 55, SkinsDataDEAGLE[DEAGLE][P_DEAGLE]);
- entity_set_string(id, EV_SZ_viewmodel, vModel);
- entity_set_string(id, EV_SZ_weaponmodel, pModel);
- return PLUGIN_HANDLED;
- }
- //ChangeDeagle-END=========================================================================================================================
- //ChangeGlock18-START=========================================================================================================================
- public ChangeGlock18(id)
- {
- if(!is_user_connected(id))
- return PLUGIN_HANDLED;
- new menu = menu_create("Choose your GLOCK18 skin" , "select_glock18_handler");
- new MenuGLOCK18[256];
- for (new i = 0; i < sizeof(SkinsDataGLOCK18); i++)
- {
- if(iCountUnlockLevel[id] < SkinsDataGLOCK18[i][UnlockLevelGLOCK18][0])
- {
- formatex(MenuGLOCK18, charsmax(MenuGLOCK18), "%s \r[Level %i/%i]", SkinsDataGLOCK18[i][NameGLOCK18], iCountUnlockLevel[id], SkinsDataGLOCK18[i][UnlockLevelGLOCK18]);
- }
- else
- formatex(MenuGLOCK18, charsmax(MenuGLOCK18), "%s \y[Unlocked] [Level %i]", SkinsDataGLOCK18[i][NameGLOCK18], iCountIndividualGLOCK18[id][i]);
- menu_additem(menu, MenuGLOCK18);
- }
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
- menu_setprop(menu, MPROP_BACKNAME, "Previous page");
- menu_setprop(menu, MPROP_NEXTNAME, "Next page");
- menu_setprop(menu, MPROP_EXITNAME, "Exit");
- menu_display(id, menu);
- return PLUGIN_HANDLED;
- }
- public select_glock18_handler(id, menu, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- if(item == model_glock18[id])
- {
- ColorChat(id, "%s !yYou already use!g GLOCK18 !yskin!g %s", Prefiks, SkinsDataGLOCK18[item][NameGLOCK18]);
- return PLUGIN_HANDLED;
- }
- new command[6], name[64], access, callback;
- menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
- if(iCountUnlockLevel[id] < SkinsDataGLOCK18[item][UnlockLevelGLOCK18][0])
- ColorChat(id, "%s !yYou don't have the required level to use!g %s !yskin.", Prefiks, SkinsDataGLOCK18[item][NameGLOCK18]);
- else
- {
- SetSkinGLOCK18(id, item);
- ColorChat(id, "%s !yYou set!g GLOCK18 !yskin!g %s", Prefiks, SkinsDataGLOCK18[item][NameGLOCK18]);
- }
- SaveData(id);
- ChangeGlock18(id);
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- SetSkinGLOCK18(id , GLOCK18)
- {
- model_glock18[id] = GLOCK18;
- new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo);
- if(Weapon != CSW_GLOCK18)
- return PLUGIN_HANDLED;
- new vModel[56];
- new pModel[56];
- format(vModel, 55, SkinsDataGLOCK18[GLOCK18][V_GLOCK18]);
- format(pModel, 55, SkinsDataGLOCK18[GLOCK18][P_GLOCK18]);
- entity_set_string(id, EV_SZ_viewmodel, vModel);
- entity_set_string(id, EV_SZ_weaponmodel, pModel);
- return PLUGIN_HANDLED;
- }
- //ChangeGlock18-END=========================================================================================================================
- //ChangeUsp-START=========================================================================================================================
- public ChangeUsp(id)
- {
- if(!is_user_connected(id))
- return PLUGIN_HANDLED;
- new menu = menu_create("Choose your USP skin" , "select_usp_handler");
- new MenuUSP[256];
- for (new i = 0; i < sizeof(SkinsDataUSP); i++)
- {
- if(iCountUnlockLevel[id] < SkinsDataUSP[i][UnlockLevelUSP][0])
- {
- formatex(MenuUSP, charsmax(MenuUSP), "%s \r[Level %i/%i]", SkinsDataUSP[i][NameUSP], iCountUnlockLevel[id], SkinsDataUSP[i][UnlockLevelUSP]);
- }
- else
- formatex(MenuUSP, charsmax(MenuUSP), "%s \y[Unlocked] [Level %i]", SkinsDataUSP[i][NameUSP], iCountIndividualUSP[id][i]);
- menu_additem(menu, MenuUSP);
- }
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
- menu_setprop(menu, MPROP_BACKNAME, "Previous page");
- menu_setprop(menu, MPROP_NEXTNAME, "Next page");
- menu_setprop(menu, MPROP_EXITNAME, "Exit");
- menu_display(id, menu);
- return PLUGIN_HANDLED;
- }
- public select_usp_handler(id, menu, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- if(item == model_usp[id])
- {
- ColorChat(id, "%s !yYou already use!g USP !yskin!g %s", Prefiks, SkinsDataUSP[item][NameUSP]);
- return PLUGIN_HANDLED;
- }
- new command[6], name[64], access, callback;
- menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
- if(iCountUnlockLevel[id] < SkinsDataUSP[item][UnlockLevelUSP][0])
- ColorChat(id, "%s !yYou don't have the required level to use!g %s !yskin.", Prefiks, SkinsDataUSP[item][NameUSP]);
- else
- {
- SetSkinUSP(id, item);
- ColorChat(id, "%s !yYou set!g USP !yskin!g %s", Prefiks, SkinsDataUSP[item][NameUSP]);
- }
- SaveData(id);
- ChangeUsp(id);
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- SetSkinUSP(id , USP)
- {
- model_usp[id] = USP;
- new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo);
- if(Weapon != CSW_USP)
- return PLUGIN_HANDLED;
- new vModel[56];
- new pModel[56];
- format(vModel, 55, SkinsDataUSP[USP][V_USP]);
- format(pModel, 55, SkinsDataUSP[USP][P_USP]);
- entity_set_string(id, EV_SZ_viewmodel, vModel);
- entity_set_string(id, EV_SZ_weaponmodel, pModel);
- return PLUGIN_HANDLED;
- }
- //ChangeUsp-END=========================================================================================================================
- public CountIndividual() {
- new iAttacker = read_data(1);
- if (is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE) {
- iCountIndividualKNIFE[iAttacker][model_knife[iAttacker]]++;
- } else if (is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_AWP) {
- iCountIndividualAWP[iAttacker][model_awp[iAttacker]]++;
- } else if (is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_AK47) {
- iCountIndividualAK47[iAttacker][model_ak47[iAttacker]]++;
- } else if (is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_M4A1) {
- iCountIndividualM4A1[iAttacker][model_m4a1[iAttacker]]++;
- } else if (is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_DEAGLE) {
- iCountIndividualDEAGLE[iAttacker][model_deagle[iAttacker]]++;
- } else if (is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_GLOCK18) {
- iCountIndividualGLOCK18[iAttacker][model_glock18[iAttacker]]++;
- } else if (is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_USP) {
- iCountIndividualUSP[iAttacker][model_usp[iAttacker]]++;
- }
- SaveData(iAttacker);
- }
- public CountLevelUnlock()
- {
- new Killer = read_data(1), Victim = read_data(2);
- if (Killer != Victim && is_user_connected(Killer) && is_user_alive(Killer))
- {
- // Increment the level
- iCountUnlockLevel[Killer]++;
- // Limit to MaxLevel
- if (iCountUnlockLevel[Killer] > MaxLevel)
- iCountUnlockLevel[Killer] = MaxLevel;
- // Save the data
- SaveData(Killer);
- }
- }
- SaveData(id)
- {
- new AuthID[35], VaultKey[512], VaultData[1024];
- get_user_authid(id, AuthID, charsmax(AuthID));
- // Save individual levels for each knife
- for (new i = 0; i < sizeof(SkinsDataKNIFE); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-knife-%d", AuthID, i);
- formatex(VaultData, charsmax(VaultData), "%d", iCountIndividualKNIFE[id][i]);
- nvault_set(g_Vault, VaultKey, VaultData);
- }
- // Save individual levels for each AWP
- for (new i = 0; i < sizeof(SkinsDataAWP); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-awp-%d", AuthID, i);
- formatex(VaultData, charsmax(VaultData), "%d", iCountIndividualAWP[id][i]);
- nvault_set(g_Vault, VaultKey, VaultData);
- }
- // Save individual levels for each AK47
- for (new i = 0; i < sizeof(SkinsDataAK47); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-ak47-%d", AuthID, i);
- formatex(VaultData, charsmax(VaultData), "%d", iCountIndividualAK47[id][i]);
- nvault_set(g_Vault, VaultKey, VaultData);
- }
- // Save individual levels for each M4A1
- for (new i = 0; i < sizeof(SkinsDataM4A1); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-m4a1-%d", AuthID, i);
- formatex(VaultData, charsmax(VaultData), "%d", iCountIndividualM4A1[id][i]);
- nvault_set(g_Vault, VaultKey, VaultData);
- }
- // Save individual levels for each Deagle
- for (new i = 0; i < sizeof(SkinsDataDEAGLE); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-deagle-%d", AuthID, i);
- formatex(VaultData, charsmax(VaultData), "%d", iCountIndividualDEAGLE[id][i]);
- nvault_set(g_Vault, VaultKey, VaultData);
- }
- // Save individual levels for each Glock18
- for (new i = 0; i < sizeof(SkinsDataGLOCK18); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-glock18-%d", AuthID, i);
- formatex(VaultData, charsmax(VaultData), "%d", iCountIndividualGLOCK18[id][i]);
- nvault_set(g_Vault, VaultKey, VaultData);
- }
- // Save individual levels for each USP
- for (new i = 0; i < sizeof(SkinsDataUSP); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-usp-%d", AuthID, i);
- formatex(VaultData, charsmax(VaultData), "%d", iCountIndividualUSP[id][i]);
- nvault_set(g_Vault, VaultKey, VaultData);
- }
- // Save selected knife model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-knife", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", model_knife[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- // Save selected AWP model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-awp", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", model_awp[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- // Save selected AK47 model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-ak47", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", model_ak47[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- // Save selected M4A1 model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-m4a1", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", model_m4a1[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- // Save selected Deagle model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-deagle", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", model_deagle[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- // Save selected Glock18 model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-glock18", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", model_glock18[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- // Save selected USP model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-usp", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", model_usp[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- // Save general level iCountUnlockLevel
- formatex(VaultKey, charsmax(VaultKey), "%s-lvl", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", iCountUnlockLevel[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- // Save Hud Option
- formatex(VaultKey, charsmax(VaultKey), "%s-hud", AuthID);
- formatex(VaultData, charsmax(VaultData), "%d", hud[id]);
- nvault_set(g_Vault, VaultKey, VaultData);
- }
- LoadData(id)
- {
- new AuthID[35], VaultKey[512], VaultData[1024], PlayerData[9][32];
- get_user_authid(id, AuthID, charsmax(AuthID));
- // Load individual levels for each knife
- for (new i = 0; i < sizeof(SkinsDataKNIFE); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-knife-%d", AuthID, i);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- iCountIndividualKNIFE[id][i] = str_to_num(VaultData);
- }
- // Load individual levels for each AWP
- for (new i = 0; i < sizeof(SkinsDataAWP); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-awp-%d", AuthID, i);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- iCountIndividualAWP[id][i] = str_to_num(VaultData);
- }
- // Load individual levels for each AK47
- for (new i = 0; i < sizeof(SkinsDataAK47); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-ak47-%d", AuthID, i);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- iCountIndividualAK47[id][i] = str_to_num(VaultData);
- }
- // Load individual levels for each M4A1
- for (new i = 0; i < sizeof(SkinsDataM4A1); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-m4a1-%d", AuthID, i);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- iCountIndividualM4A1[id][i] = str_to_num(VaultData);
- }
- // Load individual levels for each Deagle
- for (new i = 0; i < sizeof(SkinsDataDEAGLE); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-deagle-%d", AuthID, i);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- iCountIndividualDEAGLE[id][i] = str_to_num(VaultData);
- }
- // Load individual levels for each Glock18
- for (new i = 0; i < sizeof(SkinsDataGLOCK18); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-glock18-%d", AuthID, i);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- iCountIndividualGLOCK18[id][i] = str_to_num(VaultData);
- }
- // Load individual levels for each USP
- for (new i = 0; i < sizeof(SkinsDataUSP); i++)
- {
- formatex(VaultKey, charsmax(VaultKey), "%s-usp-%d", AuthID, i);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- iCountIndividualUSP[id][i] = str_to_num(VaultData);
- }
- // Load selected knife model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-knife", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- replace_all(VaultData, charsmax(VaultData), "#", " ");
- parse(VaultData, PlayerData[0], 31);
- // Assign the values from the PlayerData array to the corresponding variables for knife
- model_knife[id] = str_to_num(PlayerData[0]);
- // Load selected AWP model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-awp", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- replace_all(VaultData, charsmax(VaultData), "#", " ");
- parse(VaultData, PlayerData[1], 31);
- // Assign the values from the PlayerData array to the corresponding variables for AWP
- model_awp[id] = str_to_num(PlayerData[1]);
- // Load selected AK47 model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-ak47", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- replace_all(VaultData, charsmax(VaultData), "#", " ");
- parse(VaultData, PlayerData[2], 31);
- // Assign the values from the PlayerData array to the corresponding variables for AK47
- model_ak47[id] = str_to_num(PlayerData[2]);
- // Load selected M4A1 model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-m4a1", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- replace_all(VaultData, charsmax(VaultData), "#", " ");
- parse(VaultData, PlayerData[3], 31);
- // Assign the values from the PlayerData array to the corresponding variables for M4A1
- model_m4a1[id] = str_to_num(PlayerData[3]);
- // Load selected Deagle model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-deagle", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- replace_all(VaultData, charsmax(VaultData), "#", " ");
- parse(VaultData, PlayerData[4], 31);
- // Assign the values from the PlayerData array to the corresponding variables for Deagle
- model_deagle[id] = str_to_num(PlayerData[4]);
- // Load selected Glock18 model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-glock18", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- replace_all(VaultData, charsmax(VaultData), "#", " ");
- parse(VaultData, PlayerData[5], 31);
- // Assign the values from the PlayerData array to the corresponding variables for Glock18
- model_glock18[id] = str_to_num(PlayerData[5]);
- // Load selected USP model after disconnecting
- formatex(VaultKey, charsmax(VaultKey), "%s-usp", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- replace_all(VaultData, charsmax(VaultData), "#", " ");
- parse(VaultData, PlayerData[6], 31);
- // Assign the values from the PlayerData array to the corresponding variables for USP
- model_usp[id] = str_to_num(PlayerData[6]);
- // Load general level iCountUnlockLevel
- formatex(VaultKey, charsmax(VaultKey), "%s-lvl", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- parse(VaultData, PlayerData[7], 31);
- // Load general level iCountUnlockLevel
- iCountUnlockLevel[id] = str_to_num(PlayerData[7]);
- // Load Hud Option
- formatex(VaultKey, charsmax(VaultKey), "%s-hud", AuthID);
- nvault_get(g_Vault, VaultKey, VaultData, charsmax(VaultData));
- parse(VaultData, PlayerData[8], 31);
- hud[id] = str_to_num(PlayerData[8]) == 1;
- }
- public plugin_end()
- {
- nvault_close(g_Vault);
- }
- stock ColorChat(const id, const input[], any:...)
- {
- new count = 1, players[32];
- static msg[191];
- vformat(msg, 190, input, 3);
- replace_all(msg, 190, "!g", "^x04"); // Green Color
- replace_all(msg, 190, "!y", "^x01"); // Default Color
- replace_all(msg, 190, "!t", "^x03"); // Team Color
- if (id) players[0] = id; else get_players(players, count, "ch");
- {
- for (new i = 0; i < count; i++)
- {
- if (is_user_connected(players[i]))
- {
- message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
- write_byte(players[i]);
- write_string(msg);
- message_end();
- }
- }
- }
- }
- public amx_addlevel(id, level, cid) {
- if(!cmd_access(id, level, cid, 3))
- return PLUGIN_HANDLED;
- new szFArg[35], szSArg[16];
- read_argv(1, szFArg, charsmax(szFArg));
- read_argv(2, szSArg, charsmax(szSArg));
- new iNum = str_to_num(szSArg);
- new gTarget = cmd_target(id, szFArg, CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS | CMDTARGET_OBEY_IMMUNITY);
- if(!is_user_connected(gTarget))
- return PLUGIN_HANDLED;
- new szPlName[35], szAdmName[35];
- get_user_name(id, szAdmName, charsmax(szAdmName));
- get_user_name(gTarget, szPlName, charsmax(szPlName));
- new iRemainingLevels = MaxLevel - iCountUnlockLevel[gTarget];
- if (iRemainingLevels <= 0) {
- ColorChat(id, "^4[Levels]^1 You cannot add more levels to the player^4 %s^1. Maximum level reached.", szPlName);
- return PLUGIN_HANDLED;
- }
- if (iNum > iRemainingLevels) {
- ColorChat(id, "^4[Levels]^1 You can add a maximum of^4 %i^1 level(s) to the player^4 %s", iRemainingLevels, szPlName);
- return PLUGIN_HANDLED;
- }
- iCountUnlockLevel[gTarget] += iNum;
- ColorChat(id, "^4[Levels]^1 You added^4 %i^1 level(s) to the player^4 %s. ^3New level^1:^4 %d", iNum, szPlName, iCountUnlockLevel[gTarget]);
- ColorChat(gTarget, "^4[Levels]^1 Admin^4 %s^1 has added^4 %i^1 level(s) to you. ^3New level^1:^4 %d", szAdmName, iNum, iCountUnlockLevel[gTarget]);
- SaveData(gTarget);
- return PLUGIN_HANDLED;
- }
- public amx_setlevel(id, level, cid) {
- if(!cmd_access(id, level, cid, 3))
- return PLUGIN_HANDLED;
- new szFArg[35], szSArg[16];
- read_argv(1, szFArg, charsmax(szFArg));
- read_argv(2, szSArg, charsmax(szSArg));
- new iNum = str_to_num(szSArg);
- new gTarget = cmd_target(id, szFArg, CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS | CMDTARGET_OBEY_IMMUNITY);
- if(!is_user_connected(gTarget))
- return PLUGIN_HANDLED;
- new szPlName[35], szAdmName[35];
- get_user_name(id, szAdmName, charsmax(szAdmName));
- get_user_name(gTarget, szPlName, charsmax(szPlName));
- if (iNum > MaxLevel) {
- ColorChat(id, "^4[Levels]^1 The specified level^4 %i^1 is higher than the maximum allowed level^4 %i.", iNum, MaxLevel);
- return PLUGIN_HANDLED;
- }
- iCountUnlockLevel[gTarget] = iNum;
- ColorChat(id, "^4[Levels]^1 You set to the player^4 %s^1 level to^4 %i", szPlName, iNum);
- ColorChat(gTarget, "^4[Levels]^1 Admin^4 %s^1 has set your level to^4 %i", szAdmName, iNum);
- SaveData(gTarget);
- return PLUGIN_HANDLED;
- }
- public WeaponSkins(id)
- {
- static menu[512], iLen;
- //iLen = 0;
- iLen = formatex(menu[iLen], charsmax(menu) - iLen, "\w>>>>>\d •\r Skins Menu\d •\w >>>>>^n^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\y[\r1\y]\r •\y KNIFE\r •^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\y[\r2\y]\r •\y AWP\r •^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\y[\r3\y]\r •\y AK47\r •^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\y[\r4\y]\r •\y M4A1\r •^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\y[\r5\y]\r •\y DEAGLE\r •^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\y[\r6\y]\r •\y GLOCK-18\r •^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\y[\r7\y]\r •\y USP\r •^n^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\y[\r8\y]\r •\y Hud:\r%s", hud[id] ? "\w[\yOFF\w]^n^n" : "\d[\rON\d]^n^n");
- iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\d[\y0\d]\w <<<<< • Exit • >>>>>^n");
- show_menu(id, KEYSMENU, menu, -1, "Weapons Skins");
- }
- public weapons_skins(id, key)
- {
- switch (key)
- {
- case 0:
- {
- ChangeKnife(id);
- }
- case 1:
- {
- ChangeAwp(id);
- }
- case 2:
- {
- ChangeAk47(id);
- }
- case 3:
- {
- ChangeM4a1(id);
- }
- case 4:
- {
- ChangeDeagle(id);
- }
- case 5:
- {
- ChangeGlock18(id);
- }
- case 6:
- {
- ChangeUsp(id);
- }
- case 7:
- {
- if (!hud[id])
- {
- hud[id] = true;
- WeaponSkins(id);
- ColorChat(id, "!g>>>!y You have!g disabled!y Hud Skins Info.");
- }
- else
- {
- hud[id] = false;
- WeaponSkins(id);
- ColorChat(id, "!g>>>!y You have!g enabled!y Hud Skins Info.");
- }
- }
- }
- SaveData(id);
- return PLUGIN_HANDLED;
- }
- public ToggleHud(id)
- {
- hud[id] = !hud[id];
- if (hud[id])
- {
- client_print(id, print_chat, "[HUD] You have disabled Hud Skins Info.");
- }
- else
- {
- client_print(id, print_chat, "[HUD] You have enabled Hud Skins Info." );
- }
- // Save player data and refresh the menu
- WeaponSkins(id);
- SaveData(id); // Save the player's data after toggling the HUD
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement