KOMORNIK Napisano 29 Września 2019 1. Witam mam problem tagami nie chcą się comlować Your plugin failed to compile! Read the errors below: SourcePawn Compiler 1.7.1 Copyright (c) 1997-2006 ITB CompuPhase Copyright (c) 2004-2014 AlliedModders LLC /home/groups/sourcemod/upload_tmp/phpFdw0dm.sp(2) : fatal error 182: cannot read from file: "FFA_Manager" Compilation aborted. 1 Error. 780861 successful compiles to date. 623492 failed compiles to date. i tutaj jest kod do tagów #include <cstrike> #include <FFA_Manager> #include <sourcemod> #include <sdktools> public Plugin:myinfo = { name = "PGC24 -> VIP", description = "Autorski plugin PGC24.PL", author = "Mesharsky", version = "1.0", url = "http://www.PGC24.PL" }; // ================================= OnPluginStart (i End)================================== public OnPluginStart() { HookEvent("player_spawn", Event_TagTable); } // ================================= Eventy ================================== public Action:Event_TagTable(Handle:event, String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if(FFA_IsValidClient(client)) { CS_SetClientClanTag(client, "Gracz"); } if (FFA_IsPlayerVIP(client)) { CS_SetClientClanTag(client, "[VIP]"); } if (GetAdminFlag(GetUserAdmin(client), Admin_Custom3)) { CS_SetClientClanTag(client, "[JuniorAdmin]"); } if (GetAdminFlag(GetUserAdmin(client), Admin_Custom4)) { CS_SetClientClanTag(client, "[Admin]"); } if (GetAdminFlag(GetUserAdmin(client), Admin_Custom5)) { CS_SetClientClanTag(client, "[Opiekun]"); } if (GetAdminFlag(GetUserAdmin(client), Admin_Root)) { CS_SetClientClanTag(client, "[Właśćiciel]"); } } I o co chodzi tutaj poniżej Admin_Custom3 Admin_Custom4 Admin_Custom5 Admin_root = tu odpowiada flaga z Jakie rangi są przypisane tym rangą ? 2. Mam problem z menu nie wiem czy one powinno się automatycznie się włączać przy dołączeniu na serwer czy odpowiada jakaś komenda /* 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/>. */ #pragma semicolon 1 #define PLUGIN_AUTHOR "Mesharsky" #define PLUGIN_VERSION "0.1" #include <sourcemod> #pragma newdecls required public Plugin myinfo = { name = "[CSGO] Menu na szybko", author = PLUGIN_AUTHOR, description = "Menu na szybko", version = PLUGIN_VERSION, url = "https://go-code.pl" }; public void OnPluginStart() { RegConsoleCmd("sm_pomoc", CMD_PomocGlowna); } public Action CMD_PomocGlowna(int client, int args) { Menu menupomoc = new Menu(Menu_Pomocy); menupomoc.SetTitle("Menu pomocy - Wybierz jedną z opcji"); menupomoc.AddItem("opcja1", "» Kontakt z administracja"); menupomoc.AddItem("opcja2", "» Komendy"); menupomoc.AddItem("opcja3", "» Co posiada VIP"); menupomoc.AddItem("opcja4", "» Forum"); menupomoc.ExitButton = true; menupomoc.Display(client, 0); } public int Menu_Pomocy(Menu menupomoc, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(menupomoc, itemNum, info, sizeof(info)); if (strcmp(info, "opcja1") == 0) { Kontakt(client, 0); } else if (strcmp(info, "opcja2") == 0) { Komendy(client, 0); } else if (strcmp(info, "opcja3") == 0) { PokazCoPosiadaVip(client, 0); } else if (strcmp(info, "opcja4") == 0) { PrintToChat(client, "★ \x06[X] \x03BYLE JAKI TEKST"); } } else if (action == MenuAction_End) { CloseHandle(menupomoc); } } public Action Kontakt(int client, int args) { Menu menukontakt = new Menu(Menu_Kontaktu); menukontakt.SetTitle("Kliknij przycisk poniżej by przejść do profilu"); menukontakt.AddItem("opcja1", "Właściciel | KOMORNIK.PL"); menukontakt.AddItem("opcja2", "Admin | Nick"); menukontakt.ExitButton = true; menukontakt.Display(client, MENU_TIME_FOREVER); } public int Menu_Kontaktu(Menu menukontakt, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(menukontakt, itemNum, info, sizeof(info)); if (strcmp(info, "opcja1") == 0) { Wlasciciel1(client, 0); } else if (strcmp(info, "opcja2") == 0) { Admin1(client, 0); } } } public Action Wlasciciel1(int client, int args) { PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03WŁAŚCICIELA \x06wygenerowany został w twojej konsoli!."); PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03WŁAŚCICIELA \x06wygenerowany został w twojej konsoli!."); PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03WŁAŚCICIELA \x06wygenerowany został w twojej konsoli!."); PrintToConsole(client, "===================================================="); PrintToConsole(client, "Link do profilu właściciela Steam: https://steamcommunity.com/id/ulaniec123321/"); PrintToConsole(client, "===================================================="); } public Action Admin1(int client, int args) { PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03ADMINA \x06wygenerowany został w twojej konsoli!."); PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03ADMINA \x06wygenerowany został w twojej konsoli!."); PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03ADMINA \x06wygenerowany został w twojej konsoli!."); PrintToConsole(client, "===================================================="); PrintToConsole(client, "Link do profilu właściciela Steam: https://steamcommunity.com/id/mesharskyh2k"); PrintToConsole(client, "===================================================="); } public Action Komendy(int client, int args) { Menu menupomoc = new Menu(Menu_PomocSerwerowa); menupomoc.SetTitle("[Menu Pomocy] Wybierz co chcesz wyświetlić"); menupomoc.AddItem("option1", "Sklep Serwerowy"); menupomoc.AddItem("option2", "Wybierz Nóż"); menupomoc.AddItem("option3", "Wybierz Skiny"); menupomoc.AddItem("option4", "Vip online"); menupomoc.AddItem("option5", "Twoje miejsce w rankingu na serwerze"); menupomoc.ExitButton = true; menupomoc.Display(client, 0); } public int Menu_PomocSerwerowa(Menu menupomoc, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(menupomoc, itemNum, info, sizeof(info)); if (strcmp(info, "option1") == 0) { ClientCommand(client, "sm_shop"); } else if (strcmp(info, "option2") == 0) { ClientCommand(client, "sm_knife"); } else if (strcmp(info, "option3") == 0) { ClientCommand(client, "sm_ws"); } else if (strcmp(info, "option4") == 0) { ClientCommand(client, "sm_vips"); } else if (strcmp(info, "option5") == 0) { ClientCommand(client, "sm_rankme"); } } else if (action == MenuAction_End) { CloseHandle(menupomoc); } } public Action PokazCoPosiadaVip(int client, int args) { Menu vip = new Menu(Menu_vip); vip.SetTitle("★ Co posiada VIP : ★\n» Podwójny skok\n» Więcej HP\n» HE, FLASH, SMOKE na start rundy\n» HP za zabójstwo oraz za Headshot\n» Tag [VIP] w tabeli\n» Przedrostek VIP na chacie + unikalny kolorek\n» Otrzymujesz dodatkowe bonusy na serwerze!\n»Jesteś wyświetlany w !vips"); vip.AddItem("option1", "Przejdź do zakupu usługi"); vip.AddItem("option2", "Powrót"); vip.ExitButton = false; vip.Display(client, MENU_TIME_FOREVER); } public int Menu_vip(Handle vip, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(vip, itemNum, info, sizeof(info)); if (strcmp(info, "option1") == 0) { ClientCommand(client, "sm_sklepsms"); } else if (strcmp(info, "option2") == 0) { ClientCommand(client, "sm_vip"); } } else if (action == MenuAction_End) { CloseHandle(vip); } } Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
szogun 1 Napisano 29 Września 2019 Add 1. Brakuje ci includa FFA_Manager aby móc to skompilować Add 2. Jest na komendę !pomoc /pomoc , sm_pomoc Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
KOMORNIK Napisano 29 Września 2019 (edytowane) @szogun A dobra dzięki za informacje a mam pytanie da się przerobić 2 kod tak żeby się też automatycznie włączał każdemu kto dołączy na serwer? /edit I gdzie mogę znaleźć FFA_Manager ? Edytowane 29 Września 2019 przez KOMORNIK Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
szogun 1 Napisano 29 Września 2019 (edytowane) Jasne że się da, musisz stworzyć timer , który będzie wywoływał menu po x czasie. Edytowane 29 Września 2019 przez szogun Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
KOMORNIK Napisano 29 Września 2019 Aa a pomożesz lub nakierujesz jak to zrobić ? Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
szogun 1 Napisano 29 Września 2019 Zobacz tak Spoiler #pragma semicolon 1 #define PLUGIN_AUTHOR "Mesharsky" #define PLUGIN_VERSION "0.1" #include <sourcemod> #pragma newdecls required public Plugin myinfo = { name = "[CSGO] Menu na szybko", author = PLUGIN_AUTHOR, description = "Menu na szybko", version = PLUGIN_VERSION, url = "https://go-code.pl" }; public void OnPluginStart() { RegConsoleCmd("sm_pomoc", CMD_PomocGlowna); } public void OnClientPutInServer(int client) { CreateTimer(10.0, ShowMenu, client); } public Action ShowMenu(Handle timer, any client) { if (IsValidClient(client)) { CMD_PomocGlowna(client, 0); } } public Action CMD_PomocGlowna(int client, int args) { Menu menupomoc = new Menu(Menu_Pomocy); menupomoc.SetTitle("Menu pomocy - Wybierz jedną z opcji"); menupomoc.AddItem("opcja1", "» Kontakt z administracja"); menupomoc.AddItem("opcja2", "» Komendy"); menupomoc.AddItem("opcja3", "» Co posiada VIP"); menupomoc.AddItem("opcja4", "» Forum"); menupomoc.ExitButton = true; menupomoc.Display(client, 0); } public int Menu_Pomocy(Menu menupomoc, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(menupomoc, itemNum, info, sizeof(info)); if (strcmp(info, "opcja1") == 0) { Kontakt(client, 0); } else if (strcmp(info, "opcja2") == 0) { Komendy(client, 0); } else if (strcmp(info, "opcja3") == 0) { PokazCoPosiadaVip(client, 0); } else if (strcmp(info, "opcja4") == 0) { PrintToChat(client, "★ \x06[X] \x03BYLE JAKI TEKST"); } } else if (action == MenuAction_End) { CloseHandle(menupomoc); } } public Action Kontakt(int client, int args) { Menu menukontakt = new Menu(Menu_Kontaktu); menukontakt.SetTitle("Kliknij przycisk poniżej by przejść do profilu"); menukontakt.AddItem("opcja1", "Właściciel | KOMORNIK.PL"); menukontakt.AddItem("opcja2", "Admin | Nick"); menukontakt.ExitButton = true; menukontakt.Display(client, MENU_TIME_FOREVER); } public int Menu_Kontaktu(Menu menukontakt, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(menukontakt, itemNum, info, sizeof(info)); if (strcmp(info, "opcja1") == 0) { Wlasciciel1(client, 0); } else if (strcmp(info, "opcja2") == 0) { Admin1(client, 0); } } } public Action Wlasciciel1(int client, int args) { PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03WŁAŚCICIELA \x06wygenerowany został w twojej konsoli!."); PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03WŁAŚCICIELA \x06wygenerowany został w twojej konsoli!."); PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03WŁAŚCICIELA \x06wygenerowany został w twojej konsoli!."); PrintToConsole(client, "===================================================="); PrintToConsole(client, "Link do profilu właściciela Steam: https://steamcommunity.com/id/ulaniec123321/"); PrintToConsole(client, "===================================================="); } public Action Admin1(int client, int args) { PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03ADMINA \x06wygenerowany został w twojej konsoli!."); PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03ADMINA \x06wygenerowany został w twojej konsoli!."); PrintToChat(client, "★ \x06[Menu Pomocy] Link do profilu steam \x03ADMINA \x06wygenerowany został w twojej konsoli!."); PrintToConsole(client, "===================================================="); PrintToConsole(client, "Link do profilu właściciela Steam: https://steamcommunity.com/id/mesharskyh2k"); PrintToConsole(client, "===================================================="); } public Action Komendy(int client, int args) { Menu menupomoc = new Menu(Menu_PomocSerwerowa); menupomoc.SetTitle("[Menu Pomocy] Wybierz co chcesz wyświetlić"); menupomoc.AddItem("option1", "Sklep Serwerowy"); menupomoc.AddItem("option2", "Wybierz Nóż"); menupomoc.AddItem("option3", "Wybierz Skiny"); menupomoc.AddItem("option4", "Vip online"); menupomoc.AddItem("option5", "Twoje miejsce w rankingu na serwerze"); menupomoc.ExitButton = true; menupomoc.Display(client, 0); } public int Menu_PomocSerwerowa(Menu menupomoc, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(menupomoc, itemNum, info, sizeof(info)); if (strcmp(info, "option1") == 0) { ClientCommand(client, "sm_shop"); } else if (strcmp(info, "option2") == 0) { ClientCommand(client, "sm_knife"); } else if (strcmp(info, "option3") == 0) { ClientCommand(client, "sm_ws"); } else if (strcmp(info, "option4") == 0) { ClientCommand(client, "sm_vips"); } else if (strcmp(info, "option5") == 0) { ClientCommand(client, "sm_rankme"); } } else if (action == MenuAction_End) { CloseHandle(menupomoc); } } public Action PokazCoPosiadaVip(int client, int args) { Menu vip = new Menu(Menu_vip); vip.SetTitle("★ Co posiada VIP : ★\n» Podwójny skok\n» Więcej HP\n» HE, FLASH, SMOKE na start rundy\n» HP za zabójstwo oraz za Headshot\n» Tag [VIP] w tabeli\n» Przedrostek VIP na chacie + unikalny kolorek\n» Otrzymujesz dodatkowe bonusy na serwerze!\n»Jesteś wyświetlany w !vips"); vip.AddItem("option1", "Przejdź do zakupu usługi"); vip.AddItem("option2", "Powrót"); vip.ExitButton = false; vip.Display(client, MENU_TIME_FOREVER); } public int Menu_vip(Handle vip, MenuAction action, int client, int itemNum) { if (action == MenuAction_Select) { char info[32]; GetMenuItem(vip, itemNum, info, sizeof(info)); if (strcmp(info, "option1") == 0) { ClientCommand(client, "sm_sklepsms"); } else if (strcmp(info, "option2") == 0) { ClientCommand(client, "sm_vip"); } } else if (action == MenuAction_End) { CloseHandle(vip); } } stock bool IsValidClient(int client) { if (client >= 1 && client <= MaxClients && IsClientInGame(client)) return true; return false; } 15 minut temu, KOMORNIK napisał: @szogun A dobra dzięki za informacje a mam pytanie da się przerobić 2 kod tak żeby się też automatycznie włączał każdemu kto dołączy na serwer? /edit I gdzie mogę znaleźć FFA_Manager ? To musi być podane przy pluginie skąd pobierałeś, jeżeli nie ma to musisz szukać innego pluginu Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
KOMORNIK Napisano 29 Września 2019 @szogun A faktycznie był ten plik tylko gdzie go wrzucić ? Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
szogun 1 Napisano 29 Września 2019 Do katalogu include Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
KOMORNIK Napisano 29 Września 2019 (edytowane) a dzięki @szogun Jest sprawa bo mam pobrany ten plik lecz i tak nie mogę compilować bo są błędy Your plugin failed to compile! Read the errors below: SourcePawn Compiler 1.7.1 Copyright (c) 1997-2006 ITB CompuPhase Copyright (c) 2004-2014 AlliedModders LLC /groups/sourcemod/compiler-1.7/include/clients.inc(361) : warning 219: local variable "client" shadows a variable at a preceding level /groups/sourcemod/compiler-1.7/include/usermessages.inc(255) : warning 219: local variable "client" shadows a variable at a preceding level /groups/sourcemod/compiler-1.7/include/halflife.inc(569) : warning 219: local variable "client" shadows a variable at a preceding level /groups/sourcemod/compiler-1.7/include/halflife.inc(591) : warning 219: local variable "client" shadows a variable at a preceding level /groups/sourcemod/compiler-1.7/include/commandfilters.inc(97) : warning 219: local variable "client" shadows a variable at a preceding level /groups/sourcemod/compiler-1.7/include/helpers.inc(46) : warning 219: local variable "client" shadows a variable at a preceding level /groups/sourcemod/compiler-1.7/include/helpers.inc(155) : warning 219: local variable "client" shadows a variable at a preceding level /groups/sourcemod/compiler-1.7/include/entity_prop_stocks.inc(539) : warning 219: local variable "client" shadows a variable at a preceding level /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(16) : error 174: symbol 'Event' is a type and cannot be used as a value /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(17) : error 174: symbol 'Event' is a type and cannot be used as a value /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(18) : warning 213: tag mismatch /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(14) : error 180: function return type differs from prototype. expected 'void', but got 'int' /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(21) : warning 219: local variable "client" shadows a variable at a preceding level /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(24) : warning 213: tag mismatch /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(21) : error 180: function return type differs from prototype. expected 'void', but got 'int' /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(27) : error 021: symbol already defined: "Event" /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(30) : error 010: invalid function or declaration /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(32) : error 010: invalid function or declaration /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(34) : error 010: invalid function or declaration /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(37) : warning 219: local variable "client" shadows a variable at a preceding level /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(29) : warning 203: symbol is never used: "client" /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(27) : warning 203: symbol is never used: "dontBroadcast" /home/groups/sourcemod/upload_tmp/phpbldIRe.sp(27) : warning 203: symbol is never used: "name" 8 Errors. 780912 successful compiles to date. 623537 failed compiles to date. Edytowane 29 Września 2019 przez KOMORNIK Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Mesharsky 2 Napisano 29 Września 2019 O stary, serio plugin z 2k16 czy tam 17 wyciągnąłeś 😄 /* 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/>. */ #include <cstrike> #include <sourcemod> #define PL_VERSION "1.2" #pragma newdecls required #pragma semicolon 1 ConVar Plugin_Wlaczony; ConVar TagGracz; ConVar TagVip; ConVar TagAdmin; ConVar TagOpiekun; ConVar TagWlasciciel; ConVar TagCustom1; //Flaga p ConVar TagCustom2; //Flaga q ConVar TagCustom3; //Flaga r ConVar TagCustom4; //Flaga t ConVar g_Cvar_VipFlag; public Plugin myinfo = { name = "[CS:GO] How2Kill - Tagi w tabeli wyników", author = "Mesharsky", description = "[CS:GO] Tagi w tabeli wyników", version = PL_VERSION, url = "http://steamcommunity.com/id/MesharskyH2K" } public void OnPluginStart() { HookEvent("player_spawn", Event_PlayerSpawn); Plugin_Wlaczony = CreateConVar("plugin_enabled", "1", "Czy plugin ma być włączony czy wyłączony? 0 = wyłączony | 1 = włączony"); TagGracz = CreateConVar("tag_gracz", "[Gracz]", "Tag dla zwykłego gracza bez żadnych rang"); TagVip = CreateConVar("tag_vip", "[VIP]", "Tag dla gracza który posiada usługę VIP"); TagAdmin = CreateConVar("tag_admin", "[Admin Serwera]", "Tag dla admina (Flaga: b)"); TagOpiekun = CreateConVar("tag_opiekun", "[PREMIUM]", "Tag dla opiekuna (Flaga: s)"); TagWlasciciel = CreateConVar("tag_wlasciciel", "[Właściciel]", "Tag dla właściciela (Flaga: z)"); TagCustom1 = CreateConVar("tag_custom1", "[Wprowadz_Tag]", "Niestandardowy tag 1 (Flaga: p)"); TagCustom2 = CreateConVar("tag_custom2", "[Wprowadz_Tag]", "Niestandardowy tag 2 (Flaga: q)"); TagCustom3 = CreateConVar("tag_custom3", "[Wprowadz_Tag]", "Niestandardowy tag 3 (Flaga: r)"); TagCustom4 = CreateConVar("tag_custom4", "[SUPER PREMIUM]", "Niestandardowy tag 4 (Flaga: t)"); g_Cvar_VipFlag = CreateConVar("vip_flag", "o", "Flaga dla gracza VIP, pozostaw puste by każdy miał Vipa."); } public void OnMapStart() { AutoExecConfig(true, "H2K_TagTabela"); } public void OnClientAuthorized(int client, const char[] auth) { TagTabela(client); } public Action Event_PlayerSpawn(Handle hEvent, const char[] chName, bool bDontBroadcast) { int client = GetClientOfUserId(GetEventInt(hEvent, "userid")); TagTabela(client); } void TagTabela(int client) { if (!Plugin_Wlaczony.BoolValue) { return; } if(!IsValidClient(client)) return; char TagTabelaGracz[128]; char TagTabelaVip[128]; char TagTabelaAdmin[128]; char TagTabelaWlasciciel[128]; char TagTabelaOpiekun[128]; char TagTabelaCustom1[128]; char TagTabelaCustom2[128]; char TagTabelaCustom3[128]; char TagTabelaCustom4[128]; TagGracz.GetString(TagTabelaGracz, sizeof(TagTabelaGracz)); //none TagVip.GetString(TagTabelaVip, sizeof(TagTabelaVip)); //o TagAdmin.GetString(TagTabelaAdmin, sizeof(TagTabelaAdmin)); //b TagWlasciciel.GetString(TagTabelaWlasciciel, sizeof(TagTabelaWlasciciel)); //z TagOpiekun.GetString(TagTabelaOpiekun, sizeof(TagTabelaOpiekun)); //s TagCustom1.GetString(TagTabelaCustom1, sizeof(TagTabelaCustom1)); //p TagCustom2.GetString(TagTabelaCustom2, sizeof(TagTabelaCustom2)); //q TagCustom3.GetString(TagTabelaCustom3, sizeof(TagTabelaCustom3)); //r TagCustom4.GetString(TagTabelaCustom4, sizeof(TagTabelaCustom4)); //t if (IsValidClient(client)) { CS_SetClientClanTag(client, TagTabelaGracz); //none } if (VipPlayer(client)) { CS_SetClientClanTag(client, TagTabelaVip); //o } if (GetAdminFlag(GetUserAdmin(client), Admin_Generic)) { CS_SetClientClanTag(client, TagTabelaAdmin); //b } if (GetAdminFlag(GetUserAdmin(client), Admin_Custom5)) { CS_SetClientClanTag(client, TagTabelaOpiekun); //s } if (GetAdminFlag(GetUserAdmin(client), Admin_Custom2)) { CS_SetClientClanTag(client, TagTabelaCustom1); //p } if (GetAdminFlag(GetUserAdmin(client), Admin_Custom3)) { CS_SetClientClanTag(client, TagTabelaCustom2); //q } if (GetAdminFlag(GetUserAdmin(client), Admin_Custom4)) { CS_SetClientClanTag(client, TagTabelaCustom3); //r } if (GetAdminFlag(GetUserAdmin(client), Admin_Custom6)) { CS_SetClientClanTag(client, TagTabelaCustom4); //t } if (GetAdminFlag(GetUserAdmin(client), Admin_Root)) { CS_SetClientClanTag(client, TagTabelaWlasciciel); //z } } stock bool VipPlayer(int client) { int flag = GetFlag(); if (GetUserFlagBits(client) & flag || GetAdminFlag(GetUserAdmin(client), Admin_Root)) { return true; } else { return false; } } int GetFlag() { char flag[10]; g_Cvar_VipFlag.GetString(flag, sizeof(flag)); return ReadFlagString(flag); } bool IsValidClient(int client) { if (client <= 0 || client > MaxClients) return false; if (!IsClientInGame(client)) return false; if (IsFakeClient(client)) return false; return true; } Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
KOMORNIK Napisano 29 Września 2019 Dzięki bardzo Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Mesharsky Napisano 29 Września 2019 44 minuty temu, KOMORNIK napisał: Dzięki bardzo Coś jeszcze potrzebujesz czy możemy zamknąć temat Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Mesharsky Napisano 30 Września 2019 Wiadomość wygenerowana automatycznie Temat został zamknięty. Powodem jest całkowite rozwiązanie problemu zawartego w temacie. Jeśli się z tym nie zgadzasz, zaraportuj ten post z prośbą o ponowne otwarcie i kontynuację dyskusji. Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach