gejmer Napisano 25 Listopada 2020 Witam tak jak w tytule szukam pluginu którymy możemy włączyć/wyłączyć 2skok Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
y0ung Napisano 25 Listopada 2020 GoCode_VipTrybNormalny (3).spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami!ktos tutaj na froum dał kiedyś przerobioną wersje !dj -> on/off Double Jump. Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
gejmer Napisano 25 Listopada 2020 @y0ung Kurcze mam już plugin i będzie się to gryzło jest jakiś plugin tylko z opcja wyłączenia 2skoku? Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
y0ung Napisano 25 Listopada 2020 5 godzin temu, gejmer napisał: @y0ung Kurcze mam już plugin i będzie się to gryzło jest jakiś plugin tylko z opcja wyłączenia 2skoku? A myslalem ze uzywasz tego pluginu Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Paweł Napisano 25 Listopada 2020 7 godzin temu, gejmer napisał: @y0ung Kurcze mam już plugin i będzie się to gryzło jest jakiś plugin tylko z opcja wyłączenia 2skoku? Podeślij plugin. Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
gejmer Napisano 26 Listopada 2020 @Paweł wersja 1.9 Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
gejmer Napisano 27 Listopada 2020 Jest ktoś w stanie coś takiego zrobić bardzo bym był wdzięczny. Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Mesharsky Napisano 28 Listopada 2020 Proszę. !doublejump !dj Spoiler /* Copyright (C) 2019 Mesharsky This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*================ Updates ================ ~ Version "0.1" >> First release. ~ Version "0.2" >> New Syntax Rewrite. ~ Version "0.3" >> Fixed events. ~ Version "0.4" >> Added cvars. ~ Version "0.5" >> More Cvars + More fixes. ~ Version "0.6" >> Fixed an error when the gun menu was showing on the 1st round (HalfTime). ~ Version "0.7" >> Fixed RoundEnd Events. ~ Version "0.8" >> Added welcome and leave message for vip. // USUNIĘTE ~ Version "0.9" >> Added [VIP] tag in the cvar. ~ Version "1.0" >> Added cvar for doublejump. ~ Version "1.1" >> Added new cvars and fixed doublejump. ~ Version "1.2" >> Grenades are not respawning 2 times at the new round. ~ Version "1.3" >> Removed useless free vip from x to x hour. ~ Version "1.4" >> A lot of new features and fixes. ~ Version "1.5" >> Fixes ~ Version "1.6" >> Removed useless translations which were wrong and added English language for allied lads. ~ Version "1.7" >> Fix error [SM] Exception reported: Client 1 is not connected :).. ~ Version "1.8" >> Restored the freevip from hr to hr, and some major fixes in the code. ~ Version "1.9" >> Implemented the unlimited ammo for vip (Sincronic idea) TODO: ~ KeyValue guns menu(I am very lazy so i don't know when i will do that : )) //Should be in 1.9 or 2.0 ;p ~ Eating ASS. ============================================== //AHH LOVE http://images6.fanpop.com/image/photos/36600000/Rias-Gremory-image-rias-gremory-36601369-1920-1080.png */ /* << Includy >> */ #include <cstrike> #include <sourcemod> #include <sdktools> #include <sdkhooks> /* << Define >> */ #define NAZWA_PLUGINU "[CSGO] Zaawansowany system VIP na serwery CSGO" #define OPIS_PLUGINU "[CSGO] Zaawansowany system VIP na serwery CSGO" #define AUTOR_PLUGINU "Mesharsky" #define WERSJA_PLUGINU "1.9" #define VIP_PREFIX " ★ \x02[VIP]\x04" /* << Pragma >> */ #pragma newdecls required #pragma semicolon 1 /* << Macro >> */ #define LoopClients(%1) for(int %1 = 1; %1 <= MaxClients; %1++)\ if (IsClientInGame( % 1)) /* << ConVary >> */ ConVar g_cvVipFlag; ConVar g_cvVipUnlimitedAmmo; ConVar g_Cvar_Kamizelka_Helm_1_runda; ConVar g_CvarWiadomosciChat; ConVar g_CvarVipyOnline; ConVar g_CvarPrzywitanieVip; ConVar g_CvarPozegnanieVip; ConVar g_CvarVipPisanieWHud; ConVar g_CvarVipHP; ConVar g_CvarMaxHP; ConVar g_CvarVipHeadShotHP; ConVar g_CvarVipKillHP; ConVar g_CvarPredkoscGracza; ConVar g_CvarGrawitacja; ConVar g_CvarVipArmor; ConVar g_CvarVipHelm; ConVar g_CvarGranatyRunda; ConVar g_CvarHEGranat; ConVar g_CvarFlashGranat; ConVar g_CvarSmokeGranat; ConVar g_CvarDecoyGranat; ConVar g_CvarHealGranat; ConVar g_CvarIncGranat; ConVar g_CvarMolotovGranat; ConVar g_CvarTaGranat; ConVar g_CvarVipPieniadzeNaStart; ConVar g_CvarVipPieniadzePodlozenie; ConVar g_CvarVipPieniadzeRozbrojenie; ConVar g_CvarVipHeadShotPieniadze; ConVar g_CvarVipKillPieniadze; ConVar g_CvarVipKillKnifePieniadze; ConVar g_CvarVipWygranaPieniadze; ConVar g_CvarTagTabela; ConVar g_CvarVipTagTabela; ConVar g_CvarDoubleJump; ConVar g_CvarMenuBroni; ConVar g_CvarRundaMenuBroni; ConVar g_CvarFreeVIP; ConVar g_CvarVipFromHr; ConVar g_CvarVipToHr; /* << Inty >> */ int LiczbaRund = 0; int g_iaGrenadeOffsets[] = { 15, 17, 16, 14, 18, 17 }; int FreeVIP = 0; int g_iDJStatus[MAXPLAYERS + 1] = -1; /* << Boole >> */ bool g_bWiadomoscHud[MAXPLAYERS + 1]; /* << Informacje o pluginie >> */ public Plugin myinfo = { name = NAZWA_PLUGINU, author = AUTOR_PLUGINU, description = OPIS_PLUGINU, version = WERSJA_PLUGINU, url = "http://steamcommunity.com/id/MesharskyH2K" } public void OnPluginStart() { HookEvent("round_start", Event_RoundStart); HookEvent("player_spawn", Event_TagTable); HookEvent("player_spawn", Event_PlayerSpawn); HookEvent("player_death", Event_PlayerDeath); HookEvent("bomb_planted", Event_BombPlanted); HookEvent("bomb_defused", Event_BombDefused); HookEvent("round_end", Event_RoundEnd); HookEvent("announce_phase_end", ResetPoZmianie); HookEvent("cs_intermission", ResetPoZmianie); HookEvent("weapon_fire", Event_WeaponReload); RegConsoleCmd("sm_vips", ShowOnlineVips); RegConsoleCmd("sm_vipy", ShowOnlineVips); RegConsoleCmd("sm_vipsay", Komenda_Hud); RegConsoleCmd("sm_dj", Zmien_DJStatus); RegConsoleCmd("sm_doublejump", Zmien_DJStatus); /* << ConVary >> */ g_cvVipFlag = CreateConVar("vip_flag", "o", "Flaga dla gracza VIP, pozostaw puste by każdy miał Vipa."); g_CvarWiadomosciChat = CreateConVar("vip_wiadomosci_chat", "1", "Czy pokazywać różne wiadomości na chacie, np za zabicie?"); g_Cvar_Kamizelka_Helm_1_runda = CreateConVar("vip_disable_armor_and_helmet", "0", "Czy kamizelka i hełm mają nie działać w pierwszej rundzie?"); g_CvarVipyOnline = CreateConVar("vip_vipy_online", "1", "Czy włączyć funkcje VIPY ONLINE?"); g_CvarPrzywitanieVip = CreateConVar("vip_przywitanie", "1", "Czy włączyć przywitanie VIP'a?"); g_CvarPozegnanieVip = CreateConVar("vip_pozegnanie", "1", "Czy włączyć pożegnanie VIP'a?"); g_CvarVipPisanieWHud = CreateConVar("vip_hud_message", "1", "Czy pozwolić vipowi na pisanie w HUD?"); g_CvarVipHP = CreateConVar("zycie_vip", "105", "Ile zdrowia ma posiadać VIP na start rundy?"); g_CvarMaxHP = CreateConVar("zycie_max_vip", "130", "Maksymalna ilość zdrowia jaką gracz VIP może osiągnąć?"); g_CvarVipKillHP = CreateConVar("kill_hp_vip", "5", "Ile zdrowia ma dostawać VIP za zabicie gracza?"); g_CvarVipHeadShotHP = CreateConVar("hs_hp_vip", "10", "Ile zdrowia ma dostawać VIP za zabójstwo z HeadShot'a"); g_CvarPredkoscGracza = CreateConVar("vip_predkosc_ruchu", "1.0", "Prędkość ruchu VIP'a (1.0 - standardowo)"); g_CvarGrawitacja = CreateConVar("vip_grawitacja", "1.0", "Grawitacja dla VIP'a (1.0 - standardowo)"); g_CvarVipArmor = CreateConVar("armor_vip", "100", "Punkty kamizelki dla VIP'a? (od 1 - 100)"); g_CvarVipHelm = CreateConVar("helm_vip", "1", "Czy VIP ma posiadać darmowy hełm? (0/1)"); g_CvarVipPieniadzeNaStart = CreateConVar("vip_dodatkowe_Pieniadze", "0", "Ilość dodatkowych pieniędzy na start rundy jakie ma VIP dostawać."); g_CvarVipKillPieniadze = CreateConVar("pieniadze_kill_vip", "200", "Ile VIP ma dostawać pieniędzy za zabójstwo?"); g_CvarVipKillKnifePieniadze = CreateConVar("pieniadze_kill_knife_vip", "200", "Ile VIP ma dostawać pieniędzy za zabójstwo z noża?"); g_CvarVipHeadShotPieniadze = CreateConVar("pieniadze_hs_vip", "500", "Ile VIP ma dostawać pieniędzy za zabójstwo w głowę?"); g_CvarVipPieniadzePodlozenie = CreateConVar("pieniadze_podlozenie_vip", "1000", "Ile pieniędzy ma dostawać VIP za podłożenie bomby?"); g_CvarVipPieniadzeRozbrojenie = CreateConVar("pieniadze_rozbrojenie_vip", "1000", "Ile pieniędzy ma dostawać VIP za rozbrojenie bomby?"); g_CvarVipWygranaPieniadze = CreateConVar("pieniadze_wygranie_rundy", "500", "Ile pieniędzy ma dostawać VIP za wygranie rundy?"); g_CvarGranatyRunda = CreateConVar("vip_nades_round", "1", "Od której rundy przyznawać darmowe granaty VIP'owi?"); g_CvarHEGranat = CreateConVar("vip_he", "1", "Czy VIP ma dostawać granat HE na start rundy?"); g_CvarFlashGranat = CreateConVar("vip_flash", "1", "Czy VIP ma dostawać granat flash na start rundy?"); g_CvarSmokeGranat = CreateConVar("vip_smoke", "1", "Czy VIP ma dostawać granat smoke na start rundy?"); g_CvarDecoyGranat = CreateConVar("vip_decoy", "0", "Czy VIP ma dostawać granat decoy na start rundy?"); g_CvarHealGranat = CreateConVar("vip_heal", "0", "Czy VIP ma dostawać medishota na start rundy?"); g_CvarIncGranat = CreateConVar("vip_inc", "0", "Czy VIP ma dostawać granat podpalający (CT) na start rundy?"); g_CvarMolotovGranat = CreateConVar("vip_molotov", "0", "Czy VIP ma dostawać granat podpalający (TT) na start rundy?"); g_CvarTaGranat = CreateConVar("vip_tactic", "0", "Czy VIP ma dostawać granat Taktyczny na start rundy?"); g_CvarTagTabela = CreateConVar("vip_tag", "0", "Czy w tabeli ma widniec tag dla VIP'a?"); g_CvarVipTagTabela = CreateConVar("sm_clantag", "[VIP]", "Jaki tag w tabeli ma posiadać VIP?"); g_CvarDoubleJump = CreateConVar("double_jump", "1", "Czy VIP ma posiadać podwójny skok?"); g_CvarMenuBroni = CreateConVar("vip_menu_broni", "1", "Czy ma być menu broni dla VIP'a?"); g_CvarRundaMenuBroni = CreateConVar("vip_runda_menubroni", "3", "Od ktorej rundy ma pokazywac menu broni dla VIP'a?"); g_CvarFreeVIP = CreateConVar("vip_od_danej_godziny", "1", "Czy ma być włączony VIP dla graczy w nocy od x do x godziny?"); g_CvarVipFromHr = CreateConVar("vip_from_hr", "24", "Od ktorej godziny ma byc darmowy VIP?"); g_CvarVipToHr = CreateConVar("vip_to_hr", "6", "Do ktorej godziny ma byc darmowy VIP?"); g_cvVipUnlimitedAmmo = CreateConVar("vip_unli_ammo", "0", "Czy VIP powinien mieć nieskończoność amunicji?"); AutoExecConfig(true, "H2K_Vip_Config_1.9"); } public void OnMapStart() { LiczbaRund = 0; } public void OnClientPutInServer(int client) { g_bWiadomoscHud[client] = true; } public void OnClientPostAdminCheck(int client) { if (g_CvarPrzywitanieVip.BoolValue && IsPlayerVip(client)) { PrintToChatAll("╔════════════════════════════════════════╗"); PrintToChatAll("%s %N dołączył do gry", VIP_PREFIX, client); PrintToChatAll("╚════════════════════════════════════════╝"); } g_iDJStatus[client] = 1; } public void OnClientDisconnect(int client) { if (g_CvarPozegnanieVip.BoolValue && IsPlayerVip(client)) { PrintToChatAll("╔════════════════════════════════════════╗"); PrintToChatAll("%s %N opuścił grę", VIP_PREFIX, client); PrintToChatAll("╚════════════════════════════════════════╝"); } } public Action Komenda_Hud(int client, int args) { if (!g_CvarVipPisanieWHud.BoolValue) { PrintToChat(client, "Ta funkcja została wyłączona przez administratora serwera."); return Plugin_Handled; } if (!IsPlayerVip(client)) { PrintToChat(client, "Tylko VIP może użyć tej komendy."); return Plugin_Handled; } if (args < 1) { ReplyToCommand(client, "[SM] Użycie: sm_hudsay <tekst>"); return Plugin_Handled; } char text[192]; GetCmdArgString(text, sizeof(text)); for (int i = 1; i <= MaxClients; i++) { if (IsClientInGame(i) && !IsFakeClient(i)) { SetHudTextParams(0.35, 0.225, 10.0, 0, 255, 0, 1, 0, 2.5, 2.0); //Tutaj se edytujemy tak o beka. ShowHudText(i, 5, "VIP: %N napisał:\n%s", client, text); } } g_bWiadomoscHud[client] = false; CreateTimer(120.0, Timer_EnableMessage, client); return Plugin_Handled; } public Action Timer_EnableMessage(Handle timer, any client) { if (client) g_bWiadomoscHud[client] = true; } public Action MenuGlowne(int client) { if (IsValidClient(client)) { if (IsPlayerVip(client)) { Menu menu = new Menu(MenuHandler1); menu.SetTitle("VIP : Wybierz broń"); menu.AddItem("weapon_ak47", "AK-47"); menu.AddItem("weapon_m4a1", "M4A4"); menu.AddItem("weapon_m4a1_silencer", "M4A1-S"); menu.AddItem("weapon_awp", "AWP"); menu.AddItem("weapon_ssg08", "SCOUT"); menu.AddItem("weapon_xm1014", "XM1014"); menu.AddItem("weapon_famas", "FAMAS"); menu.ExitButton = true; menu.Display(client, 15); } } } public int MenuHandler1(Menu menu, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(menu, itemNum, info, sizeof(info)); if (IsPlayerAlive(client)) { StripAllWeapons(client); GivePlayerItem(client, "weapon_knife"); GivePlayerItem(client, info); MenuBroni(client); } } else if (action == MenuAction_End) CloseHandle(menu); } public Action MenuBroni(int client) { if (IsValidClient(client)) { if (IsPlayerVip(client)) { Menu menusec = new Menu(MenuHandler2); menusec.SetTitle("VIP : Wybierz pistolet"); menusec.AddItem("weapon_deagle", "Deagle"); menusec.AddItem("weapon_revolver", "R8 Revolver"); menusec.AddItem("weapon_fiveseven", "Five-Seven"); menusec.AddItem("weapon_tec9", "Tec-9"); menusec.AddItem("weapon_cz75a", "CZ7a"); menusec.AddItem("weapon_elite", "Dual Elites"); menusec.AddItem("weapon_p250", "p250"); menusec.ExitButton = true; menusec.Display(client, 15); } } } public int MenuHandler2(Menu menusec, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(menusec, itemNum, info, sizeof(info)); if (IsPlayerAlive(client)) GivePlayerItem(client, info); } else if (action == MenuAction_End) CloseHandle(menusec); } public Action Event_RoundStart(Event hEvent, const char[] chName, bool bDontBroadcast) { if (GameRules_GetProp("m_bWarmupPeriod") != 1) LiczbaRund = LiczbaRund + 1; if (g_CvarFreeVIP.BoolValue) { int from_hr = g_CvarVipFromHr.IntValue; int to_hr = g_CvarVipToHr.IntValue; if(from_hr || to_hr) { char string_hour[8]; FormatTime(string_hour, sizeof(string_hour), "%H", GetTime()); int hour = StringToInt(string_hour); if(from_hr > to_hr) FreeVIP = (hour >= from_hr || hour < to_hr)? 1: 0; else FreeVIP = (hour >= from_hr && hour < to_hr)? 1: 0; } else FreeVIP = 0; } } public Action ResetPoZmianie(Event hEvent, const char[] chName, bool bDontBroadcast) { LiczbaRund = 0; } public Action Event_PlayerSpawn(Event hEvent, const char[] chName, bool bDontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); if (GameRules_GetProp("m_bWarmupPeriod") == 1) return; if (IsPlayerVip(client)) { SetEntityHealth(client, g_CvarVipHP.IntValue); if (g_Cvar_Kamizelka_Helm_1_runda.BoolValue && LiczbaRund <= 1) return; else { SetEntProp(client, Prop_Send, "m_ArmorValue", g_CvarVipArmor.IntValue); SetEntProp(client, Prop_Send, "m_bHasHelmet", g_CvarVipHelm.IntValue); } SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") + g_CvarVipPieniadzeNaStart.IntValue); SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", g_CvarPredkoscGracza.FloatValue); SetEntityGravity(client, g_CvarGrawitacja.FloatValue); if (GetClientTeam(client) == CS_TEAM_CT && GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser"); if (LiczbaRund >= g_CvarGranatyRunda.IntValue) { if (g_CvarHEGranat.BoolValue) GivePlayerItem(client, "weapon_hegrenade"); if (g_CvarFlashGranat.BoolValue) GivePlayerItem(client, "weapon_flashbang"); if (g_CvarSmokeGranat.BoolValue) GivePlayerItem(client, "weapon_smokegrenade"); if (g_CvarDecoyGranat.BoolValue) GivePlayerItem(client, "weapon_decoy"); if (g_CvarHealGranat.BoolValue) GivePlayerItem(client, "weapon_healthshot"); if (GetClientTeam(client) == CS_TEAM_CT && g_CvarIncGranat.BoolValue) GivePlayerItem(client, "weapon_incgrenade"); if (GetClientTeam(client) == CS_TEAM_T && g_CvarMolotovGranat.BoolValue) GivePlayerItem(client, "weapon_molotov"); if (g_CvarTaGranat.BoolValue) GivePlayerItem(client, "weapon_tagrenade"); } } if (g_CvarMenuBroni.BoolValue && LiczbaRund >= g_CvarRundaMenuBroni.IntValue) MenuGlowne(client); } public Action Event_PlayerDeath(Event hEvent, const char[] chName, bool bDontBroadcast) { int attacker = GetClientOfUserId(hEvent.GetInt("attacker")); int victim = GetClientOfUserId(hEvent.GetInt("userid")); if (!IsValidClient(attacker)) return; char weapon[64]; GetEventString(hEvent, "weapon", weapon, sizeof(weapon)); if (IsPlayerVip(attacker)) { if (GetClientTeam(attacker) != GetClientTeam(victim)) { bool headshot = hEvent.GetBool("headshot", false); //false - default. int PieniadzeGracza = GetEntProp(attacker, Prop_Send, "m_iAccount"); int HP = GetClientHealth(attacker); if (headshot) { SetEntProp(attacker, Prop_Send, "m_iAccount", g_CvarVipHeadShotPieniadze.IntValue + PieniadzeGracza); if (HP + g_CvarVipHeadShotHP.IntValue > g_CvarMaxHP.IntValue) SetEntityHealth(attacker, g_CvarMaxHP.IntValue); if (HP + g_CvarVipHeadShotHP.IntValue <= g_CvarMaxHP.IntValue) SetEntityHealth(attacker, HP + g_CvarVipHeadShotHP.IntValue); } else { SetEntProp(attacker, Prop_Send, "m_iAccount", g_CvarVipKillPieniadze.IntValue + PieniadzeGracza); if (HP + g_CvarVipKillHP.IntValue > g_CvarMaxHP.IntValue) SetEntityHealth(attacker, g_CvarMaxHP.IntValue); if (HP + g_CvarVipKillHP.IntValue <= g_CvarMaxHP.IntValue) SetEntityHealth(attacker, HP + g_CvarVipKillHP.IntValue); } //if (StrEqual(weapon, "knife")) if (StrContains(weapon, "knife", false) != -1 || StrContains(weapon, "bayonet", false) != -1) { SetEntProp(attacker, Prop_Send, "m_iAccount", g_CvarVipKillKnifePieniadze.IntValue + PieniadzeGracza); if (g_CvarWiadomosciChat.BoolValue) PrintToChat(attacker, "%s Jako VIP otrzymałeś %i$ za zabójstwo z noża.", VIP_PREFIX, g_CvarVipKillKnifePieniadze.IntValue); } } } } public Action Event_BombPlanted(Event hEvent, const char[] chName, bool bDontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); int PieniadzeGracza = GetEntProp(client, Prop_Send, "m_iAccount"); if (IsPlayerVip(client)) { if (g_CvarWiadomosciChat.BoolValue) PrintToChat(client, "%s Jako VIP otrzymałeś %i$ za podłożenie bomby.", VIP_PREFIX, g_CvarVipPieniadzePodlozenie.IntValue); SetEntProp(client, Prop_Send, "m_iAccount", g_CvarVipPieniadzePodlozenie.IntValue + PieniadzeGracza); } } public Action Event_BombDefused(Event hEvent, const char[] chName, bool bDontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); int PieniadzeGracza = GetEntProp(client, Prop_Send, "m_iAccount"); if (IsPlayerVip(client)) { if (g_CvarWiadomosciChat.BoolValue) PrintToChat(client, "%s Jako VIP otrzymałeś %i$ za rozbrojenie bomby.", VIP_PREFIX, g_CvarVipPieniadzeRozbrojenie.IntValue); SetEntProp(client, Prop_Send, "m_iAccount", g_CvarVipPieniadzeRozbrojenie.IntValue + PieniadzeGracza); } } public Action Event_RoundEnd(Event hEvent, const char[] chName, bool bDontBroadcast) { int WygranaDruzyna = hEvent.GetInt("winner"); for (int client = 1; client < MAXPLAYERS + 1; client++) { if(!IsValidClient(client)) return; if (IsPlayerVip(client)) { RemoveNades(client); if (GetClientTeam(client) == WygranaDruzyna) SetEntProp(client, Prop_Send, "m_iAccount", g_CvarVipWygranaPieniadze.IntValue + GetEntProp(client, Prop_Send, "m_iAccount")); } } } public Action Event_TagTable(Event hEvent, const char[] chName, bool bDontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); char TagTabela[128]; g_CvarVipTagTabela.GetString(TagTabela, sizeof(TagTabela)); if (IsPlayerVip(client) && g_CvarTagTabela.BoolValue) CS_SetClientClanTag(client, TagTabela); } public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon) { if (!IsValidClient(client)) { return Plugin_Handled; } if (!g_CvarDoubleJump.BoolValue) { return Plugin_Continue; } if (IsPlayerVip(client) && IsPlayerAlive(client)) { if (g_iDJStatus[client] == -1) { g_iDJStatus[client] = 1; } else if (!g_iDJStatus[client]) { return Plugin_Continue; } static int g_fLastButtons[MAXPLAYERS + 1], g_fLastFlags[MAXPLAYERS + 1], g_iJumps[MAXPLAYERS + 1], fCurFlags, fCurButtons; fCurFlags = GetEntityFlags(client); fCurButtons = GetClientButtons(client); if (g_fLastFlags[client] & FL_ONGROUND && !(fCurFlags & FL_ONGROUND) && !(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP)g_iJumps[client]++; else if (fCurFlags & FL_ONGROUND)g_iJumps[client] = 0; else if (!(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP && g_iJumps[client] == 1) { g_iJumps[client]++; float vVel[3]; GetEntPropVector(client, Prop_Data, "m_vecVelocity", vVel); vVel[2] = 250.0; TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vVel); } g_fLastFlags[client] = fCurFlags; g_fLastButtons[client] = fCurButtons; } return Plugin_Continue; } public Action Zmien_DJStatus(int client, int args) { if (!g_CvarDoubleJump.BoolValue || !IsPlayerVip(client)) { return Plugin_Continue; } if (g_iDJStatus[client]) { g_iDJStatus[client] = 0; PrintToChat(client, "%s DoubleJump został wyłączony.", VIP_PREFIX); } else { g_iDJStatus[client] = 1; PrintToChat(client, "%s DoubleJump został włączony.", VIP_PREFIX); } return Plugin_Handled; } public Action Event_WeaponReload(Event hEvent, const char[] chName, bool bDontBroadcast) { if (!g_cvVipUnlimitedAmmo.BoolValue) return; int client = GetClientOfUserId(hEvent.GetInt("userid")); int weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon"); if (!IsValidClient(client)) return; char ClassN[32]; GetEdictClassname(weapon, ClassN, sizeof(ClassN)); if(IsPlayerVip(client) && IsPlayerAlive(client)) { if(weapon > 0 && (weapon == GetPlayerWeaponSlot(client, CS_SLOT_PRIMARY) || weapon == GetPlayerWeaponSlot(client, CS_SLOT_SECONDARY))) { if (StrContains(ClassN, "weapon_", false) != -1) { SetEntProp(weapon, Prop_Send, "m_iClip1", 32); SetEntProp(weapon, Prop_Send, "m_iClip2", 32); } } } } public Action ShowOnlineVips(int client, int args) { if (!g_CvarVipyOnline.BoolValue) { PrintToChat(client, "Ta funkcja została wyłączona przez administratora serwera."); return Plugin_Handled; } int iCount = 0; Menu menu = new Menu(Menu_Handler); menu.SetTitle("Gracze VIP, którzy aktualnie znajdują się na serwerze"); for (int i = 1; i < MaxClients; i++) { if(IsValidClient(i)) { if (IsPlayerVip(i) && IsClientInGame(i)) { char format[128]; char cid[16]; char name[MAX_NAME_LENGTH + 1]; IntToString(i, cid, sizeof cid); GetClientName(i, name, sizeof name); Format(format, sizeof format, "[VIP] » %s", name); menu.AddItem(cid, format, ITEMDRAW_DISABLED); iCount++; } } } if (iCount == 0) { menu.AddItem("ITEMDRAW_DISABLED", "Ups, wygląda na to, że nie ma graczy online, którzy posiadają usługę VIP."); } menu.ExitButton = true; menu.Display(client, 0); return Plugin_Handled; } public int Menu_Handler(Menu menu, MenuAction action, int client, int itemNum) { if (action == MenuAction_End) CloseHandle(menu); } stock void StripAllWeapons(int client) { int iEnt; for (int i = 0; i <= 2; i++) { while ((iEnt = GetPlayerWeaponSlot(client, i)) != -1) { RemovePlayerItem(client, iEnt); AcceptEntityInput(iEnt, "Kill"); } } } stock void RemoveNades(int client) { while (RemoveWeaponBySlot(client, 3)) { } for (int i = 0; i < 6; i++) SetEntProp(client, Prop_Send, "m_iAmmo", 0, _, g_iaGrenadeOffsets[i]); } stock bool RemoveWeaponBySlot(int client, int iSlot) { int iEntity = GetPlayerWeaponSlot(client, iSlot); if (IsValidEdict(iEntity)) { RemovePlayerItem(client, iEntity); AcceptEntityInput(iEntity, "Kill"); return true; } return false; } stock bool IsPlayerVip(int client) { char flag[10]; g_cvVipFlag.GetString(flag, sizeof(flag)); if (GetUserFlagBits(client) & ReadFlagString(flag) || GetAdminFlag(GetUserAdmin(client), Admin_Root) || FreeVIP) return true; return false; } stock bool IsValidClient(int client) { if (client <= 0)return false; if (client > MaxClients)return false; if (!IsClientConnected(client))return false; if (IsClientReplay(client))return false; if (IsFakeClient(client))return false; if (IsClientSourceTV(client))return false; return IsClientInGame(client); } /* © 2019 Coded with ❤ for Rias */ /* © 2019 Coded with ❤ for Akame */ /* © 2019 Coded with ❤ for Est */ /* © 2019 Coded with ❤ for Yoshino */ /* © 2019 Coded with ❤ for Koneko */ /* © 2019 Coded with ❤ for Erina */ /* © 2019 Coded with ❤ for Megumi */ /* © 2019 Coded with ❤ for Akeno */ /* © 2019 Coded with ❤ for Mero */ /* © 2019 Coded with ❤ for Papi */ /* © 2019 Coded with ❤ for Suu */ /* © 2019 Coded with ❤ for Lilith */ /* © 2019 Coded with ❤ for Mitsuha */ /* © 2019 Coded with ❤ for Matsuzaka */ /* © 2019 Coded with ❤ for Maki */ /* © 2019 Coded with ❤ for Alice */ /* © 2019 Coded with ❤ for Konno Yuuki (*) Arigato! :< */ Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach