Brum Brum 13 1 1 1 Napisano 12 Stycznia 2019 (edytowane) Tak jakoś mi się nudziło, więc napisałem dr`a i stwierdziłem, że czemu by go nie udostępnić. Znajdują tu się 4 pluginy z czego 1 to cfg do bh a pozostałe 2 to są freeruny. Zależy komu jaki freerun się spodoba ? Główny plugin ADPET_Deathrun.sp Blokuje komendy samobójcze, blokuje zmianę teamu, wybiera losowego ttka Spoiler /* * Wersja 1.0 Pierwsze wydanie pluginu * Wersja 1.1/1.2 Nawet nie pamiętam * Wersja 1.3. * Jeżeli plugin nie wykryje mapy typu deathrun wyłączy się. [dr_ / deathrun_] * Po wykryciu bota przez plugin jest automatycznie wyrzucany * Zmiana systemu wybierania TT. Po zmianie został naprawiony bug gdy wyszedł aktualny * terrorysta przerzucało losowego CT do TT i przenosiło na spawn * Zablokowano możliwość zostania wylosowanym x2 z rzędu do TT * Dodano możliwość zmianę MOD_TAG poprzez ConVar * Zmiana sposobu ustawienia terrorysty jako osobę zabijającą CT gdy CT wpadnie w pułapkę / popełni samobójstwo * * Dodano dodatkowe forwardy oraz native */ #include <sdktools> #include <sdkhooks> #include <cstrike> #include <deathrun> #pragma semicolon 1 #pragma newdecls required //#define MOD_TAG "\x01\x0B★ \x07[ADEPT -> DR Manager]\x04 " ArrayList pula_graczy; int Terrorist = -1, LastTerrorist; ConVar gc_MOD_TAG, gc_MinPlayers; char MOD_TAG[64]; Handle g_hOnBecomeTerrorist, g_hOnTerroristDie, g_hOnTerroristDisconnect; // sv_disable_show_team_select_menu /* Do testu */ public Plugin myinfo = { name = "ADEPT --> Deathrun", description = "Autorski Plugin StudioADEPT.net", author = "Brum Brum", version = "1.3", url = "http://www.StudioADEPT.net/forum", }; /********************************************** ******************OnPluginStart**************** ***********************************************/ public void OnPluginStart() { pula_graczy = new ArrayList(); gc_MinPlayers = CreateConVar("sm_dr_minplayers", "2", "Minimalna ilość graczy do wylosowania TT"); gc_MOD_TAG = CreateConVar("sm_mod_tag", "ADEPT", "MOD_TAG"); gc_MOD_TAG.AddChangeHook(MOD_TAG_Changed); gc_MOD_TAG.GetString(MOD_TAG, sizeof(MOD_TAG)); /** Forwards **/ g_hOnBecomeTerrorist = CreateGlobalForward("dr_OnBecomeTerrorist", ET_Ignore, Param_Cell); g_hOnTerroristDie = CreateGlobalForward("dr_OnTerroristDie", ET_Ignore, Param_Cell, Param_Cell, Param_Cell, Param_String); g_hOnTerroristDisconnect = CreateGlobalForward("dr_OnTerroristDisconnect", ET_Ignore, Param_Cell); /** Forwards **/ HookEvent("round_start", Event_RoundStart); HookEvent("round_end", Event_RoundEnd); HookEvent("player_spawn", Event_PlayerSpawn); HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre); AddCommandListener(ChangeTeam, "jointeam"); AddCommandListener(ChangeTeam, "teammenu"); AddCommandListener(ChangeTeam, "spectate"); AddCommandListener(KillCommand, "kill"); AddCommandListener(KillCommand, "killvector"); AddCommandListener(KillCommand, "killserver"); AddCommandListener(KillCommand, "explode"); AddCommandListener(KillCommand, "explodevector"); AutoExecConfig(true, "ADEPT_Deathrun"); } public void MOD_TAG_Changed(ConVar cvar, const char[] oldValue, const char[] newValue) { Format(MOD_TAG, sizeof(MOD_TAG), "%s", newValue); } /********************************************** ******************OnMapStart******************* ***********************************************/ public void OnMapStart() { char MapName[128]; GetCurrentMap(MapName, sizeof(MapName)); if (!strncmp(MapName, "dr_", 3, false) || !strncmp(MapName, "deathrun_", 9, false)) { PrintToServer("[Deathrun] Poprawnie wczytano menadżera"); } else SetFailState("[Deathrun] Nie wykryto mapy typu deathrun!"); ServerCommand("mp_autoteambalance 0"); ServerCommand("mp_limitteams 0"); ServerCommand("mp_freezetime 0"); ServerCommand("mp_autokick 0"); ServerCommand("sv_disable_radar 1"); ServerCommand("mp_force_pick_time 3600"); ServerCommand("mp_equipment_reset_rounds 1"); ServerCommand("mp_ct_default_melee weapon_knife"); ServerCommand("mp_ct_default_secondary ."); ServerCommand("mp_t_default_melee weapon_knife"); ServerCommand("mp_t_default_secondary ."); } /********************************************** *******OnClientPutInServer/Disconnect********** ***********************************************/ public void OnClientAuthorized(int client, const char[] auth) { if (IsFakeClient(client)) { ServerCommand("bot_quota 0"); ServerCommand("bot_kick"); } } public void OnClientDisconnect(int client) { if (IsPlayerTerrorist(client)) { Call_StartForward(g_hOnTerroristDisconnect); Call_PushCell(client); Call_Finish(); Terrorist = -1; } } /********************************************** ********************Events********************* ***********************************************/ public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { if (IsWarmup())return; if (Terrorist == -1) { CreateTimer(1.0, CheckTT, _, TIMER_FLAG_NO_MAPCHANGE); } } public Action Event_RoundEnd(Event event, const char[] name, bool dontBroadcast) { if (IsWarmup())return; for (int i = 1; i <= MaxClients; i++) { if (IsValidClient(i) && GetClientTeam(i) == CS_TEAM_T) { CS_SwitchTeam(i, CS_TEAM_CT); } } Terrorist = -1; if (Terrorist == -1)CreateTimer(1.0, CheckTT, _, TIMER_FLAG_NO_MAPCHANGE); } public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); if (!IsValidClient(client))return; if (IsPlayerTerrorist(client)) { Call_StartForward(g_hOnBecomeTerrorist); Call_PushCell(client); Call_Finish(); } } public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast) { int victim = GetClientOfUserId(event.GetInt("userid")); int attacker = GetClientOfUserId(event.GetInt("attacker")); int assister = GetClientOfUserId(event.GetInt("assister")); char weapon[32]; event.GetString("weapon", weapon, sizeof(weapon)); if (GetClientTeam(victim) == CS_TEAM_CT && dr_GetCurrentTerrorist() != -1) { attacker = GetClientUserId(dr_GetCurrentTerrorist()); event.SetInt("attacker", attacker); return Plugin_Changed; } if (IsPlayerTerrorist(victim)) { Call_StartForward(g_hOnTerroristDie); Call_PushCell(victim); Call_PushCell(attacker); Call_PushCell(assister); Call_PushString(weapon); Call_Finish(); } return Plugin_Continue; } /********************************************** *******************Commands******************** ***********************************************/ public Action ChangeTeam(int client, const char[] command, int args) { int team = GetClientTeam(client); if (team == CS_TEAM_NONE) { CreateTimer(0.01, Timer_ChangeTeam, GetClientUserId(client)); return Plugin_Handled; } if (team == CS_TEAM_CT || team == CS_TEAM_T) { PrintCenterText(client, "<font color='#ff0000' size='22'>%s ;-)</font>", team == CS_TEAM_CT ? "Nie możesz zmienić teamu" : "Nie możesz uciekać od bycia terrorystą"); return Plugin_Handled; } return Plugin_Continue; } public Action KillCommand(int client, const char[] command, int args) { PrintToChat(client, "\x01\x0B★ \x07[%s -> DR Manager]\x04 Komendy samobójcze zostały wyłączone ;-)", MOD_TAG); return Plugin_Handled; } /********************************************** ********************Timers********************* ***********************************************/ public Action CheckTT(Handle timer) { if (timer == timer) { if (Terrorist == -1) { if (GetPlayersCount() >= gc_MinPlayers.IntValue)SetRandomTT(); else PrintToChatAll("\x01\x0B★ \x07[%s -> DR Manager]\x04 Jest za mało graczy aby wybrać \x02terrorystę!", MOD_TAG); } } else delete timer; } public Action Timer_ChangeTeam(Handle timer, int userid) { int client = GetClientOfUserId(userid); if (!IsValidClient(client))return Plugin_Stop; if (!dr_IsPlayerTerrorist(client))CS_SwitchTeam(client, CS_TEAM_CT); if (IsWarmup())CreateTimer(0.1, RespawnPlayers, GetClientUserId(client)); if (GetPlayersCount() == 1)CreateTimer(1.0, FixRound, GetClientUserId(client)); return Plugin_Stop; } public Action RespawnPlayers(Handle timer, int userid) { int client = GetClientOfUserId(userid); if (!IsValidClient(client))return Plugin_Stop; CS_RespawnPlayer(client); return Plugin_Stop; } public Action FixRound(Handle timer, int userid) { int client = GetClientOfUserId(userid); if (!IsValidClient(client))return; CS_RespawnPlayer(client); ForcePlayerSuicide(client); } /********************************************** ********************RandomTT******************* ***********************************************/ void SetRandomTT() { int client = GetRandomPlayerByTeam(CS_TEAM_CT); while (client == LastTerrorist || client == 0) { client = GetRandomPlayerByTeam(CS_TEAM_CT); } Terrorist = client; LastTerrorist = client; if (Terrorist != -1) { PrintToChatAll("\x01\x0B★ \x07[%s -> DR Manager]\x04 Losowy terrorysta został wybrany. Został nim \x02%N", MOD_TAG, Terrorist); ChangeClientTeam(client, CS_TEAM_T); } } /********************************************** ********************INNE*********************** ***********************************************/ bool IsPlayerTerrorist(int client) { if (Terrorist == client)return true; return false; } stock int GetRandomPlayerByTeam(int team) { pula_graczy.Clear(); for (int i = 1; i <= MaxClients; i++) { if (IsValidClient(i) && GetClientTeam(i) == team)pula_graczy.Push(i); } if (pula_graczy.Length == 0)return 0; return pula_graczy.Get(GetRandomInt(0, pula_graczy.Length - 1)); } int GetPlayersCount() { int count; for (int i = 1; i <= MaxClients; i++) { if (IsValidClient(i) && PlayerHaveTeam(i))count++; } return count; } bool PlayerHaveTeam(int client) { if (GetClientTeam(client) == CS_TEAM_CT || GetClientTeam(client) == CS_TEAM_T)return true; return false; } /********************************************** ****************Native/Forwards**************** ***********************************************/ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) { CreateNative("dr_IsPlayerTerrorist", Native_IsTerrorist); CreateNative("dr_GetCurrentTerrorist", Native_GetCurrentTerrorist); RegPluginLibrary("deathrun"); return APLRes_Success; } public int Native_IsTerrorist(Handle plugin, int numParams) { int client = GetNativeCell(1); if (IsPlayerTerrorist(client))return true; return false; } public int Native_GetCurrentTerrorist(Handle plugin, int numParams) { return Terrorist; } ADEPT_Deathrun_Bhop.sp zwykły cfg na bh w pluginie Spoiler #pragma semicolon 1 #pragma newdecls required public Plugin myinfo = { name = "ADEPT --> BunnyHop CFG", description = "Autorski Plugin StudioADEPT.net", author = "Brum Brum", version = "1.0", url = "http://www.StudioADEPT.net/forum", }; public void OnConfigsExecuted() { ServerCommand("sv_autobunnyhopping 1"); ServerCommand("sv_enablebunnyhopping 1"); ServerCommand("sv_airaccelerate 2500"); ServerCommand("sv_accelerate 10"); ServerCommand("sv_staminajumpcost 0"); ServerCommand("sv_staminalandcost 0"); ServerCommand("sv_staminamax 0"); ServerCommand("sv_staminarecoveryrate 0"); ServerCommand("sv_maxvelocity 5000"); } ADEPT_Freerun.sp po wpisaniu /fre /free /freerun /fr włącz freeruna i blokuje użycie przycisku E w odległości 130 unitów od guzika Spoiler /* * Wersja 1.0 Pierwsze wypuszczenie pluginu * Wersja 1.1 * Dodano ustawienie MOD_TAG poprzez ConVar * Od teraz przycisk 'E' jest blokowany tylko i wyłącznie w odległości 130unitów od guzika * Dodano nativy. */ #include <deathrun> #pragma semicolon 1 #pragma newdecls required //#define MOD_TAG "\x01\x0B★ \x07[ADEPT -> Freerun]\x04 " ConVar gc_MOD_TAG; char MOD_TAG[64]; bool free; public Plugin myinfo = { name = "ADEPT --> Deathrun Freerun", description = "Autorski Plugin StudioADEPT.net", author = "Brum Brum", version = "1.1", url = "http://www.StudioADEPT.net/forum", }; public void OnPluginStart() { gc_MOD_TAG = FindConVar("sm_mod_tag"); if (gc_MOD_TAG == null)(gc_MOD_TAG = CreateConVar("sm_mod_tag", "ADEPT", "MOD_TAG")).AddChangeHook(MOD_TAG_Changed); gc_MOD_TAG.GetString(MOD_TAG, sizeof(MOD_TAG)); RegConsoleCmd("sm_fre", CMD_FreeRun); RegConsoleCmd("sm_free", CMD_FreeRun); RegConsoleCmd("sm_freerun", CMD_FreeRun); RegConsoleCmd("sm_fr", CMD_FreeRun); HookEvent("round_start", Event_RoundStart); } public void MOD_TAG_Changed(ConVar cvar, const char[] oldValue,const char[] newValue) { Format(MOD_TAG, sizeof(MOD_TAG), "%s", newValue); } public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { free = false; } public void dr_OnBecomeTerrorist(int client) { PrintToChat(client, "\x01\x0B★ \x07[%s -> Freerun]\x04 Aby włączyć \x02Freerun\x04 wpisz \x02!free\x04 / \x02!Freerun", MOD_TAG); } public Action CMD_FreeRun(int client, int args) { if (dr_IsPlayerTerrorist(client)) { if (!free) { free = true; PrintToChatAll("\x01\x0B★ \x07[%s -> Freerun]\x04 Gracz -> \x02%N\x04 włączył \x02FreeRun\x04", MOD_TAG, client); } else PrintToChat(client, "\x01\x0B★ \x07[%s -> Freerun]\x04 Aktualnie \x02FreeRun\x04 jest włączony!", MOD_TAG); } else PrintToChat(client, "\x01\x0B★ \x07[%s -> Freerun]\x04 Tylko terrorysta może włączyć \x02FreeRun", MOD_TAG); } public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2]) { if (IsPlayerAlive(client) && dr_IsPlayerTerrorist(client) && free) { if (buttons & IN_USE) { float clientPos[3], entPos[3]; char sEnt[64], sEntName[128]; int ent = FindNearestEntity(client, "func_button", 130.0); if (!IsValidEntity(ent) || ent == -1)return Plugin_Continue; GetClientAbsOrigin(client, clientPos); GetEntPropVector(ent, Prop_Data, "m_vecOrigin", entPos); GetEntPropString(ent, Prop_Data, "m_iName", sEntName, sizeof(sEntName)); float distance = GetVectorDistance(clientPos, entPos); GetEntityClassname(ent, sEnt, sizeof(sEnt)); if (StrEqual(sEnt, "func_button", false) && distance <= 130) { buttons = buttons & ~IN_USE; return Plugin_Changed; } } } return Plugin_Continue; } public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) { CreateNative("dr_IsFreerun", Native_IsFreerun); CreateNative("dr_EnableFreerun", Native_EnableFreerun); CreateNative("dr_DisableFreerun", Native_DisableFreerun); RegPluginLibrary("deathrun_freerun"); return APLRes_Success; } public int Native_IsFreerun(Handle plugin, int numParams) { return free; } public int Native_EnableFreerun(Handle plugin, int numParams) { free = true; } public int Native_DisableFreerun(Handle plugin, int numParams) { free = false; } int FindNearestEntity(int client, char[] classname, float radius) { int nearestent = -1; float clientPos[3], entPos[3]; float distance; GetClientAbsOrigin(client, clientPos); int ent = FindEntityByClassname(-1, classname); if (!IsValidEntity(ent))return -1; GetEntPropVector(ent, Prop_Data, "m_vecOrigin", entPos); distance = GetVectorDistance(clientPos, entPos); while (IsValidEntity(ent) && distance > radius) { ent = FindEntityByClassname(ent, classname); GetEntPropVector(ent, Prop_Data, "m_vecOrigin", entPos); distance = GetVectorDistance(clientPos, entPos); nearestent = ent; } return nearestent; } ADEPT_Freerun_MenuVersion.sp Po wybraniu ttka wyskakuje mu menu z wybraniem Freerun bądź normalna runda do czasu wybrania nie może chodzić. /fr /free jeżeli menu zniknęło Spoiler /* * Wersja 1.0 Pierwsze wypuszczenie pluginu * Wersja 1.1 * Od teraz 'freeruny' dodajesz poprzez plik tekstowy oraz ustawiasz na jakiej mapie * mają być[all / nazwa_mapy;nazwa_mapy2] * Dodano ustawienie MOD_TAG w pliku tekstowym * Dodano komendy /fr /fre /free tylko i wyłącznie z powodu bugowania się przy głosowaniu na zmianę mapy * tzn. Jeżeli ktoś został przeniesiony do TT i wyskakiwało głosowanie menu znikało, a gracz pozostawał zamrożony * Dodano komendę /rf do przeładowania pliku konfiguracyjnego * Dodano wiadomości w hudzie, która pokazuje za co jest freerun * Od teraz przycisk 'E' jest blokowany tylko i wyłącznie w odległości 130unitów od guzika * Dodano nativy. * Naprawiono błąd przez który CT mógł włączyć freeruna */ #include <deathrun> #pragma semicolon 1 #pragma newdecls required //#define MOD_TAG "\x01\x0B★ \x07[ADEPT -> FreeRun]\x04 " KeyValues kv; char MOD_TAG[64]; bool free, used; int gametype = -1; ArrayList FreerunEnd, FreerunMap; public Plugin myinfo = { name = "ADEPT --> Deathrun Freerun", description = "Autorski Plugin StudioADEPT.net", author = "Brum Brum", version = "1.1", url = "http://www.StudioADEPT.net/forum", }; public void OnPluginStart() { FreerunEnd = new ArrayList(32); FreerunMap = new ArrayList(4096); HookEvent("round_start", Event_RoundStart); RegConsoleCmd("sm_fr", CMD_Free); RegConsoleCmd("sm_fre", CMD_Free); RegConsoleCmd("sm_free", CMD_Free); RegConsoleCmd("sm_rf", CMD_ReloadFreerun); } public void OnMapStart() { ResetArrays(); LoadConfig(); } void ResetArrays() { FreerunEnd.Clear(); FreerunMap.Clear(); } public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { gametype = -1; free = false; used = false; } public Action CMD_Free(int client, int args) { if (dr_IsPlayerTerrorist(client)) { if (free)PrintToChat(client, "\x01\x0B★ \x07[%s -> Freerun]\x04 Aktualnie trwa freerun!", MOD_TAG); else if (!free && !used)CreateTimer(0.01, ShowFreeRunMenu, GetClientUserId(client)); } else PrintToChat(client, "\x01\x0B★ \x07[%s -> Freerun]\x04 Tylko\x02 TERRORYSTA\x04 może włączyc freeruna!", MOD_TAG); } public Action CMD_ReloadFreerun(int client, int args) { ResetArrays(); LoadConfig(); PrintToChat(client, "\x01\x0B★ \x07[%s -> Freerun]\x04 Poprawnie przeładowano freeruna", MOD_TAG); } public void dr_OnBecomeTerrorist(int client) { CreateTimer(0.1, ShowFreeRunMenu, GetClientUserId(client)); } public Action ShowFreeRunMenu(Handle timer, int userid) { int client = GetClientOfUserId(userid); if (!IsValidClient(client))return; SetEntityMoveType(client, MOVETYPE_NONE); Menu menu = new Menu(Menu_Handler); menu.SetTitle("%s -> Freerun", MOD_TAG); menu.AddItem("", "Bez Freerun`a"); menu.AddItem("", "Freerun"); menu.ExitButton = false; menu.Display(client, MENU_TIME_FOREVER); } public int Menu_Handler(Menu menu, MenuAction action, int client, int item) { if (!IsValidClient(client))return; if (!dr_IsPlayerTerrorist(client))return; switch (action) { case MenuAction_Select: { switch (item) { case 0: { free = false; used = true; PrintToChatAll("\x01\x0B★ \x07[%s -> Freerun]\x04 Podczas tej rundy \x02NIE BĘDZIE\x04 Freerun`a", MOD_TAG); SetEntityMoveType(client, MOVETYPE_WALK); } case 1: { Menu nmenu = new Menu(FreeRun_Handler); nmenu.SetTitle("%s -> Freerun za ?", MOD_TAG); for (int i = 0; i < FreerunEnd.Length; i++) { char buffer[32], frmap[128], id[10]; Format(id, sizeof(id), "%d", i); FreerunEnd.GetString(i, buffer, sizeof(buffer)); FreerunMap.GetString(i, frmap, sizeof(frmap)); if (!IsMap(frmap))nmenu.AddItem(id, buffer); } nmenu.ExitButton = false; nmenu.Display(client, MENU_TIME_FOREVER); } } } case MenuAction_End:delete menu; } } public int FreeRun_Handler(Menu menu, MenuAction action, int client, int item) { if (!IsValidClient(client))return; switch (action) { case MenuAction_Select: { char info[32], buffer[32]; menu.GetItem(item, info, sizeof(info)); int id = StringToInt(info); FreerunEnd.GetString(id, buffer, sizeof(buffer)); gametype = id; free = true; used = true; SetEntityMoveType(client, MOVETYPE_WALK); PrintToChatAll("\x01\x0B★ \x07[%s -> Freerun]\x04 Freerun odbędzie się za \x02%s", MOD_TAG, buffer); CreateTimer(4.0, ShowGameMode, _, TIMER_REPEAT); } case MenuAction_End:delete menu; } } public Action ShowGameMode(Handle timer) { if (!free)return Plugin_Stop; char buffer[32]; FreerunEnd.GetString(gametype, buffer, sizeof(buffer)); SetHudTextParams(0.15, 0.7, 4.0, 0, 255, 0, 255); for (int i = 1; i <= MaxClients; i++) { if (IsValidClient(i))ShowHudText(i, -1, "Freerun za: %s", buffer); } return Plugin_Continue; } public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2]) { if (IsPlayerAlive(client) && dr_IsPlayerTerrorist(client) && free) { if (buttons & IN_USE) { float clientPos[3], entPos[3]; char sEnt[64], sEntName[128]; int ent = FindNearestEntity(client, "func_button", 130.0); if (!IsValidEntity(ent) || ent == -1)return Plugin_Continue; GetClientAbsOrigin(client, clientPos); GetEntPropVector(ent, Prop_Data, "m_vecOrigin", entPos); GetEntPropString(ent, Prop_Data, "m_iName", sEntName, sizeof(sEntName)); float distance = GetVectorDistance(clientPos, entPos); GetEntityClassname(ent, sEnt, sizeof(sEnt)); if (StrEqual(sEnt, "func_button", false) && distance <= 130) { buttons = buttons & ~IN_USE; return Plugin_Changed; } } } return Plugin_Continue; } bool IsMap(const char[] frmap) { char FrMap[128][128], map[128]; GetCurrentMap(map, sizeof(map)); ExplodeString(frmap, ";", FrMap, sizeof(FrMap), sizeof(FrMap[])); for (int i = 0; i < sizeof(FrMap); i++) { if (IsEmptyString(FrMap[i]))break; if (StrEqual(map, FrMap[i], false))return true; } return false; } void LoadConfig() { delete kv; kv = CreateKeyValues("Freerun"); char sPath[PLATFORM_MAX_PATH]; BuildPath(Path_SM, sPath, sizeof(sPath), "configs/ADEPT_Freerun.txt"); if (!FileExists(sPath))SetFailState("[Freerun] Nie znaleziono pliku: %s", sPath); kv.ImportFromFile(sPath); char info[64]; kv.GetString("MOD_TAG", info, sizeof(info)); strcopy(MOD_TAG, sizeof(MOD_TAG), info); kv.GotoFirstSubKey(); do { char buffer[32], map[128]; kv.GetSectionName(buffer, sizeof(buffer)); buffer[0] = CharToUpper(buffer[0]); FreerunEnd.PushString(buffer); kv.GetString("map", map, sizeof(map)); FreerunMap.PushString(map); } while (kv.GotoNextKey()); } public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) { CreateNative("dr_IsFreerun", Native_IsFreerun); CreateNative("dr_EnableFreerun", Native_EnableFreerun); CreateNative("dr_DisableFreerun", Native_DisableFreerun); RegPluginLibrary("deathrun_freerun"); return APLRes_Success; } public int Native_IsFreerun(Handle plugin, int numParams) { return free; } public int Native_EnableFreerun(Handle plugin, int numParams) { free = true; } public int Native_DisableFreerun(Handle plugin, int numParams) { free = false; } bool IsEmptyString(const char[] string) { if (!string[0])return true; else return false; } int FindNearestEntity(int client, char[] classname, float radius) { int nearestent = -1; float clientPos[3], entPos[3]; float distance; GetClientAbsOrigin(client, clientPos); int ent = FindEntityByClassname(-1, classname); if (!IsValidEntity(ent))return -1; nearestent = ent; GetEntPropVector(ent, Prop_Data, "m_vecOrigin", entPos); distance = GetVectorDistance(clientPos, entPos); while (IsValidEntity(ent) && distance > radius) { ent = FindEntityByClassname(ent, classname); if (!IsValidEntity(ent))return -1; GetEntPropVector(ent, Prop_Data, "m_vecOrigin", entPos); distance = GetVectorDistance(clientPos, entPos); nearestent = ent; } return nearestent; } Plik konfiguracyjny wrzucamy do folderu configs ( addons/sourcemod/configs) Spoiler "Freerun" { "MOD_TAG" "ADEPT" "Obojętnie" { "map" "all" // all[Wszystkie] / nazwa konkretnej mapy np. dr_stone, więcej map dodajemy po ; np. dr_stone;dr_arctic; } "BH" { "map" "deathrun_bananaland_sn2;deathrun_classic;dr_clouds" } "BH + Pestki" { "map" "deathrun_bananaland_sn2;deathrun_classic" } "AWP" { "map" "all" } "AWP + NS" { "map" "all" } "Deagle" { "map" "all" } "Deagle + Pestki" { "map" "all" } "Noże" { "map" "all" } "Old" { "map" "all" } } Zabraniam kopiowania powyższych pluginów na inne fora niż go-code.pl bez mojej zgody. ADEPT_Deathrun_Bhop.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! Starsza wersja: Spoiler ADEPT_Freerun.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! ADEPT_Freerun_MenuVersion.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! ADEPT_Deathrun.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! deathrun.incHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! ADEPT_Freerun.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! ADEPT_Freerun_MenuVersion.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! ADEPT_Deathrun.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami!ADEPT_Freerun.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami!ADEPT_Freerun_MenuVersion.spHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! ADEPT_Freerun.txtHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami!deathrun.incHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! Edytowane 27 Listopada 2020 przez Brum Brum fix Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
MAGNET Napisano 12 Stycznia 2019 Good job! ? Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
BobPixel 1 Napisano 14 Grudnia 2019 (edytowane) Tutaj taka mała ode mnie propozycja jakby miała wyjść aktualizacja freeruna. Zeby zrobić pod kv w sensie żeby dostosować pod mapę wybór za co się chce free np knife old itd Edytowane 14 Grudnia 2019 przez BobPixel Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Brum Brum 3 1 Napisano 14 Grudnia 2019 (edytowane) 14 minut temu, BobPixel napisał: Tutaj taka mała ode mnie propozycja jakby miała wyjść aktualizacja freeruna. Zeby zrobić pod kv w sensie żeby dostosować pod mapę wybór za co się chce free np knife old itd Wszystko mam ładnie pięknie zaktualizowane, tylko czeka na aktualizację(na forum) jak większość pluginów 😉 Myślę, że niedługo opublikuję Edytowane 14 Grudnia 2019 przez Brum Brum Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Brum Brum 3 1 1 Napisano 11 Stycznia 2020 (edytowane) @Update Deathrun: Jeżeli plugin nie wykryje mapy typu deathrun wyłączy się. [dr_ / deathrun_] Po wykryciu bota przez plugin jest automatycznie wyrzucany Zmiana systemu wybierania TT. Po zmianie został naprawiony bug gdy wyszedł aktualny terrorysta przerzucało losowego CT do TT i przenosiło na spawn Zablokowano możliwość zostania wylosowanym x2 z rzędu do TT Dodano możliwość zmianę MOD_TAG poprzez ConVar Zmiana sposobu ustawienia terrorysty jako osobę zabijającą CT gdy CT wpadnie w pułapkę / popełni samobójstwo Dodano dodatkowe forwardy oraz native Freerun / Wersja z menu Od teraz przycisk 'E' jest blokowany tylko i wyłącznie w odległości 130unitów od guzika (stała blokada przeszkadzała przy podnoszeniu broni) Dodano nativy Dodano możliwość zmiany MOD_TAG poprzez ConVar / Plik konfiguracyjny (Wersja z menu) Freerun Wersja z menu: Od teraz 'freeruny' dodajesz poprzez plik tekstowy oraz ustawiasz na jakiej mapie mają być [all / nazwa_mapy;nazwa_mapy2] Dodano komendy /fr /fre /free tylko i wyłącznie z powodu bugowania się przy głosowaniu na zmianę mapy Dodano komendę /rf do przeładowania pliku konfiguracyjnego Dodano wiadomości w hudzie, która pokazuje za co jest freerun Naprawiono błąd przez który CT mógł włączyć freeruna Edytowane 11 Stycznia 2020 przez Brum Brum Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Shadow Napisano 24 Maja 2020 Jest możliwe dodanie czegoś takiego, jeśli osoba wybrana do TT, wyjdzie z serwera zostanie zapisana w pliku (SteamID Nazwa gracza) aby wiedzieć kto wychodzi z TT (i wyciągnąć konsekwencje) tylko po to żeby wejść z powrotem i grać jako CT I sam plugin super <3! Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
MysterY Napisano 27 Listopada 2020 Mam problem z pluginem ADEPT_Freerun_MenuVersion cały czas generuje takie błędy: L 11/27/2020 - 08:58:38: [SM] Blaming: ADEPT_Freerun_MenuVersion.smx L 11/27/2020 - 08:58:38: [SM] Call stack trace: L 11/27/2020 - 08:58:38: [SM] [0] GetEntPropVector L 11/27/2020 - 08:58:38: [SM] [1] Line 290, C:\Users\optimus\Downloads\dr\ADEPT_Freerun_MenuVersion.sp::FindNearestEntity L 11/27/2020 - 08:58:38: [SM] [2] Line 192, C:\Users\optimus\Downloads\dr\ADEPT_Freerun_MenuVersion.sp::OnPlayerRunCmd L 11/27/2020 - 08:58:38: [SM] Exception reported: Entity -1 (-1) is invalid L 11/27/2020 - 08:58:38: [SM] Blaming: ADEPT_Freerun_MenuVersion.smx L 11/27/2020 - 08:58:38: [SM] Call stack trace: L 11/27/2020 - 08:58:38: [SM] [0] GetEntPropVector L 11/27/2020 - 08:58:38: [SM] [1] Line 290, C:\Users\optimus\Downloads\dr\ADEPT_Freerun_MenuVersion.sp::FindNearestEntity L 11/27/2020 - 08:58:38: [SM] [2] Line 192, C:\Users\optimus\Downloads\dr\ADEPT_Freerun_MenuVersion.sp::OnPlayerRunCmd L 11/27/2020 - 08:58:38: [SM] Exception reported: Entity -1 (-1) is invalid L 11/27/2020 - 08:58:38: [SM] Blaming: ADEPT_Freerun_MenuVersion.smx L 11/27/2020 - 08:58:38: [SM] Call stack trace: L 11/27/2020 - 08:58:38: [SM] [0] GetEntPropVector L 11/27/2020 - 08:58:38: [SM] [1] Line 290, C:\Users\optimus\Downloads\dr\ADEPT_Freerun_MenuVersion.sp::FindNearestEntity L 11/27/2020 - 08:58:38: [SM] [2] Line 192, C:\Users\optimus\Downloads\dr\ADEPT_Freerun_MenuVersion.sp::OnPlayerRunCmd L 11/27/2020 - 08:58:38: [SM] Exception reported: Entity -1 (-1) is invalid Czy ktoś również miał z tym styczność i wie jak to naprawić ? @Brum Brum Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Brum Brum Napisano 27 Listopada 2020 22 minuty temu, MysterY napisał: Czy ktoś również miał z tym styczność i wie jak to naprawić ? @Brum Brum Zupdatowałem post, pobierz nowszą wersję. Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach