From 4fea3369d22ca0e3e9bd8fdbc49cc7676f4556d2 Mon Sep 17 00:00:00 2001 From: gsd Date: Wed, 2 Aug 2023 19:55:10 +0300 Subject: [PATCH] niggers --- niggersmodels.sp | 190 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 niggersmodels.sp diff --git a/niggersmodels.sp b/niggersmodels.sp new file mode 100644 index 0000000..0756c43 --- /dev/null +++ b/niggersmodels.sp @@ -0,0 +1,190 @@ +#pragma semicolon 1 +#include +#include + +public Plugin:myinfo = +{ + name = "Set one team nigger", + author = "gsd", + description = "fuck lgbt++", + version = "1.0", + url = "https://tf2.pblr-nyk.pro/" +} + +bool g_SetupNigger[101] = {false, ...}; + +TFTeam NiggerTeam = TFTeam_Blue; + +public void OnMapStart() { + AddNiggersToDownload(true); + AddFemPyroToDownload(true); +} + +public void OnPluginStart() { + HookEvent("player_spawn", Event_SpawnNigger, EventHookMode_Post); +} + +public void AddFemPyroToDownload(bool:logging){ + char support_classes[][] = {"pyro"}; + char downloaded_exts[][] = {"mdl", "phy", "dx80.vtx", "dx90.vtx", "sw.vtx", "vvd"}; + char download_str[128]; + //add to table + for(int i = 0; i < sizeof(support_classes); i++) { + for(int j = 0; j < sizeof(downloaded_exts); j++) { + Format(download_str, 128, "models/player/fem_pyro_assed/%s.%s", support_classes[i], downloaded_exts[j]); + AddFileToDownloadsTable(download_str); + if (logging) PrintToServer("AddFileToDownloadsTable: %s", download_str); + } + } + + //add models + for(int i = 0; i < sizeof(support_classes); i++) { + Format(download_str, 64, "models/player/fem_pyro_assed/%s.mdl", support_classes[i]); + PrecacheModel(download_str, true); + if (logging) PrintToServer("PrecacheModel: %s", download_str); + } + + //add materials + char material_str[128]; + char base_materials_path[128] = "materials/facti13/%s/%s"; + char m_pyro[][] = {"pyro_hands_blu.vmt", "pyrotex_blu.vmt", "pyrotex_blu_gib.vmt", "pyrotex_blu_invun.vmt", "pyrotex_blu_zombie.vmt", "pyrotex_blu_zombie_alphatest.vmt", "pyrotex_blu_zombie_invun.vmt", "pyrotex_red.vmt", + "pyrotex_red_gib.vmt", "pyrotex_red_invun.vmt", "pyrotex_red_zombie.vmt", "pyrotex_red_zombie_alphatest.vmt", "pyrotex_red_zombie_invun.vmt", "pyrotex_blu.vtf", "pyrotex_blu_zombie.vtf", "pyrotex_gib.vtf", "pyrotex_invuln.vtf", "pyrotex_normal.vtf", + "pyrotex_red.vtf", "pyrotex_red_zombie.vtf"}; + for(int i = 0; i < sizeof(m_pyro); i++) { + Format(material_str, 128, base_materials_path, "fem_pyro", m_pyro[i]); + AddFileToDownloadsTable(material_str); + PrecacheDecal(material_str, true); + if (logging) PrintToServer("PrecacheDecal: %s", material_str); + } +} + +public void AddNiggersToDownload(bool:logging){ + char support_classes[][] = {"engineer", "heavy", "medic", "scout", "sniper", "soldier", "spy"}; + char downloaded_exts[][] = {"mdl", "phy", "dx80.vtx", "dx90.vtx", "sw.vtx", "vvd"}; + char download_str[128]; + + //add to table + for(int i = 0; i < sizeof(support_classes); i++) { + for(int j = 0; j < sizeof(downloaded_exts); j++) { + Format(download_str, 128, "models/player/nigger/%s.%s", support_classes[i], downloaded_exts[j]); + AddFileToDownloadsTable(download_str); + if (logging) PrintToServer("AddFileToDownloadsTable: %s", download_str); + } + } + + //add models + for(int i = 0; i < sizeof(support_classes); i++) { + Format(download_str, 64, "models/player/nigger/%s.mdl", support_classes[i]); + PrecacheModel(download_str, true); + if (logging) PrintToServer("PrecacheModel: %s", download_str); + } + + //add materials + char material_str[128]; + char base_materials_path[128] = "materials/facti13/niggers/%s/%s"; + //engineer + char m_engi[][] = {"engineer_red_gib.vtf", "engineer_red.vtf", "engineer_head.vtf", "engineer_handL.vtf", "engineer_blue_gib.vtf", "engineer_blue.vtf", + "engineer_red.vmt", "engineer_mech_hand_blue.vmt", "engineer_mech_hand.vmt", "engineer_head_red.vmt", "engineer_head_blue.vmt", "engineer_blue.vmt", + "hwm/engineer_head_blue.vmt", "hwm/engineer_head_red.vmt", "hwm/engineer_head.vtf", "hwm/engineer_head_compress.vtf", "hwm/engineer_head_stretch.vtf"}; + for(int i = 0; i < sizeof(m_engi); i++) { + Format(material_str, 128, base_materials_path, "engineer", m_engi[i]); + AddFileToDownloadsTable(material_str); + PrecacheDecal(material_str, true); + if (logging) PrintToServer("PrecacheDecal: %s", material_str); + } + //hvyweapon + char m_hvy[][] = {"eyeball_l.vmt", "eyeball_r.vmt", "heavy_head_blue.vmt", "heavy_head_red.vmt", "hvyweapon_blue.vmt", "hvyweapon_hands.vmt", "hvyweapon_hands_sheen.vmt", "hvyweapon_red.vmt", + "heavy_head.vtf", "hvyweapon_blue.vtf", "hvyweapon_blue_gib.vtf", "hvyweapon_hands.vtf", "hvyweapon_red.vtf", "hvyweapon_red_gib.vtf", "hwm/heavy_head_blue.vmt", "hwm/heavy_head_red.vmt", + "hwm/heavy_head.vtf", "hwm/heavy_head_compress.vtf", "hwm/heavy_head_stretch.vtf"}; + for(int i = 0; i < sizeof(m_hvy); i++) { + Format(material_str, 128, base_materials_path, "hvyweapon", m_hvy[i]); + AddFileToDownloadsTable(material_str); + PrecacheDecal(material_str, true); + if (logging) PrintToServer("PrecacheDecal: %s", material_str); + } + //medic + char m_medic[][] = {"eyeball_l.vmt", "eyeball_r.vmt", "medic_backpack_blue.vmt", "medic_backpack_red.vmt", "medic_blue.vmt", "medic_head_blue.vmt", "medic_head_red.vmt", "medic_red.vmt", + "medic_blue.vtf", "medic_blue_gib.vtf", "medic_head.vtf", "medic_red.vtf", "medic_red_gib.vtf", "hwm/medic_head_blue.vmt", "hwm/medic_head_red.vmt", "hwm/medic_head.vtf", "hwm/medic_head_compress.vtf", "hwm/medic_head_stretch.vtf"}; + for(int i = 0; i < sizeof(m_medic); i++) { + Format(material_str, 128, base_materials_path, "medic", m_medic[i]); + AddFileToDownloadsTable(material_str); + PrecacheDecal(material_str, true); + if (logging) PrintToServer("PrecacheDecal: %s", material_str); + } + //scout + char m_scout[][] = {"eyeball_l.vmt", "eyeball_r.vmt", "scout_blue.vmt", "scout_head_blue.vmt", "scout_head_red.vmt", "scout_red.vmt", "scout_blue.vtf", "scout_blue_gib.vtf", "scout_hands.vtf", "scout_head.vtf", "scout_red.vtf", "scout_red_gib.vtf", + "hwm/scout_head_blue.vmt", "hwm/scout_head_red.vmt", "hwm/scout_head.vtf", "hwm/scout_head_compress.vtf", "hwm/scout_head_stretch.vtf"}; + for(int i = 0; i < sizeof(m_scout); i++) { + Format(material_str, 128, base_materials_path, "scout", m_scout[i]); + AddFileToDownloadsTable(material_str); + PrecacheDecal(material_str, true); + if (logging) PrintToServer("PrecacheDecal: %s", material_str); + } + //sniper + char m_sniper[][] = {"eyeball_l.vmt", "eyeball_r.vmt", "sniper_blue.vmt", "sniper_head_blue.vmt", "sniper_head_red.vmt", "sniper_red.vmt", "sniper_blue.vtf", "sniper_blue_gib.vtf", "sniper_handL_red.vtf", "sniper_head.vtf", "sniper_red.vtf", + "sniper_red_gib.vtf", "hwm/sniper_head_blue.vmt", "hwm/sniper_head_red.vmt", "hwm/sniper_head.vtf", "hwm/sniper_head_compress.vtf", "hwm/sniper_head_stretch.vtf"}; + for(int i = 0; i < sizeof(m_sniper); i++) { + Format(material_str, 128, base_materials_path, "sniper", m_sniper[i]); + AddFileToDownloadsTable(material_str); + PrecacheDecal(material_str, true); + if (logging) PrintToServer("PrecacheDecal: %s", material_str); + } + //soldier + char m_soldier[][] = {"eyeball_l.vmt", "eyeball_r.vmt", "soldier_blue.vmt", "soldier_head_blue.vmt", "soldier_head_red.vmt", "soldier_red.vmt", "soldier_blue.vtf", "soldier_blue_gib.vtf", "soldier_hands.vtf", "soldier_head.vtf", "soldier_red.vtf", + "soldier_red_gib.vtf", "hwm/soldier_head_blue.vmt", "hwm/soldier_head_red.vmt", "hwm/soldier_head.vtf", "hwm/soldier_head_compress.vtf", "hwm/soldier_head_stretch.vtf"}; + for(int i = 0; i < sizeof(m_soldier); i++) { + Format(material_str, 128, base_materials_path, "soldier", m_soldier[i]); + AddFileToDownloadsTable(material_str); + PrecacheDecal(material_str, true); + if (logging) PrintToServer("PrecacheDecal: %s", material_str); + } + //spy + char m_spy[][] = {"eyeball_l.vmt", "eyeball_r.vmt", "spy_blue.vmt", "spy_head_blue.vmt", "spy_head_red.vmt", "spy_red.vmt", "spy_blue.vtf", "spy_blue_gib.vtf", "spy_hands_blue.vtf", "spy_hands_red.vtf", "spy_head_blue.vtf", "spy_head_red.vtf", + "spy_red.vtf", "spy_red_gib.vtf", "hwm/spy_head_blue.vmt", "hwm/spy_head_red.vmt", "hwm/spy_head_blue.vtf", "hwm/spy_head_blue_compress.vtf", "hwm/spy_head_blue_stretch.vtf", "hwm/spy_head_red.vtf", "hwm/spy_head_red_compress.vtf", "hwm/spy_head_red_stretch.vtf"}; + for(int i = 0; i < sizeof(m_spy); i++) { + Format(material_str, 128, base_materials_path, "spy", m_spy[i]); + AddFileToDownloadsTable(material_str); + PrecacheDecal(material_str, true); + if (logging) PrintToServer("PrecacheDecal: %s", material_str); + } +} + +public Action:Event_SpawnNigger(Handle:event, const String:name[], bool:dontBroadcast) { + int client = GetClientOfUserId(GetEventInt(event, "userid")); + if(TF2_GetClientTeam(client) != NiggerTeam) return; + if(g_SetupNigger[client]) return; + //таймер нужен иначе нихуя не будет + g_SetupNigger[client] = true; + CreateTimer(0.1, EquipNiggerSkin, client); +} + +stock GetNiggerModelPath(TFClassType:class, String:name[], maxlen) +{ + switch (class) + { + case TFClass_Scout: Format(name, maxlen, "models/player/nigger/scout.mdl"); + case TFClass_Soldier: Format(name, maxlen, "models/player/nigger/soldier.mdl"); + case TFClass_Pyro: Format(name, maxlen, "models/player/fem_pyro_assed/pyro.mdl"); + //case TFClass_DemoMan: Format(name, maxlen, "models/player/demoman.mdl"); + case TFClass_DemoMan: Format(name, maxlen, ""); + case TFClass_Heavy: Format(name, maxlen, "models/player/nigger/heavy.mdl"); + case TFClass_Engineer: Format(name, maxlen, "models/player/nigger/engineer.mdl"); + case TFClass_Medic: Format(name, maxlen, "models/player/nigger/medic.mdl"); + case TFClass_Sniper: Format(name, maxlen, "models/player/nigger/sniper.mdl"); + case TFClass_Spy: Format(name, maxlen, "models/player/nigger/spy.mdl"); + default: Format(name, maxlen, ""); + } +} + +public Action:EquipNiggerSkin(Handle:hTimer, any:client) { + char mdl[PLATFORM_MAX_PATH]; + GetNiggerModelPath(TF2_GetPlayerClass(client), mdl, sizeof(mdl)); + if (strlen(mdl) == 0) return; + //PrintToServer("Set model to %N: %s", client, mdl); + PrecacheModel(mdl); + SetVariantString(mdl); + AcceptEntityInput(client, "SetCustomModel"); + SetEntProp(client, Prop_Send, "m_bUseClassAnimations", 1); + g_SetupNigger[client] = false; + return; +}