Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

MYGO.pl

RSSy
  • Postów

    28667
  • Dołączył

  • Ostatnia wizyta

    nigdy
  • Wygrane w rankingu

    11

Treść opublikowana przez MYGO.pl

  1. Hello. Can someone create a small plugin for Assassination mode maps that every round does a sound of my choice and a hud or dhud message saying something like "Player X is now the VIP" ? Thank you in advance! Przeczytaj cały wpis
  2. Trying to find somebody that can help me build a JailBreak CCS Server with a store to buy hats and fun skins. Trying to make my dream come true thanks. Przeczytaj cały wpis
  3. Hi! I'm using this player model plugin. The server keeps shutting down even thought the model is uploaded to the right folder and the name is properly set in the .cfg file. csgo_agents.cfg file: Quote: #The skin for the Terrorist and Counter-Strike team must be placed in the respective section. #Model: "Skin name", "Model name (without .mdl)", "Preview file name (with .html)", "ONLY VIP (1/0)" #If you don't want a skin preview, write in the quotes where the file name should be "NOPREVIEW". #The skins of each player are saved on SteamID. [SETTINGS] PREVIEW_MENU = 1 #Meniul pentru preview (0/1) MODELS_COUNTER = 0 #Textul din meniu care arata cate modele sunt. VIP_FLAG = n #Flag-ul VIP. [MYSQL CONNECTION] SQL_HOSTNAME = xxxxxxxxx SQL_USERNAME = xxxxxxxxxx SQL_PASSWORD = xxxxxxxxx SQL_DATABASE = xxxxxxxxxx [Terrorist] "Deadpool" "deadpool" "NOPREVIEW" "0" [Counter-Strike] "Big Smoke" "bigsmoke" "NOPREVIEW" "1" Obviously "deadpool" and "bigsmoke" models are uploaded to the proper folder in models/player/etc... What should I change? Thanks PHP Code: #include <amxmodx> #include <amxmisc> #include <sqlx> #include <hamsandwich> #include <hl_player_models_api> #define PLUGIN "CSGO Agents" #define VERSION "2.2" #define AUTHOR "lexzor" #define MAX_SKINS 100 #define NON_USED_SKIN 300 #pragma semicolon 1 #pragma compress 1 /////// //SQL// /////// ; new const SQL_HOSTNAME[] = "SQL_HOSTNAME"; new const SQL_USERNAME[] = "SQL_USERNAME"; new const SQL_PASSWORD[] = "SQL_PASSWORD"; new const SQL_DATABASE[] = "SQL_DATABASE"; new const PREVIEW_MENU[] = "PREVIEW_MENU"; new const MODELS_COUNTER[] = "MODELS_COUNTER"; new const VIP_FLAG[] = "VIP_FLAG"; new const g_szTable[] = "CSGO_Agents_Players_Data"; new Handle:g_SqlTuple; new g_Error[512]; new const g_szPluginName[] = "CSGO AGENTS"; ////////// //CONFIG// ////////// new const g_szFileName[] = "csgo_agents.cfg"; new const g_szMOTDFolder[] = "csgo_agents_motd"; new g_szFile[124]; new const g_szFileInfo[][] = { "#Skinul pentru echipa Terrorist si Counter-Strike trebuie puse la sectiunea respectiva.^n", "#Model: ^"Nume Skin^", ^"Nume model (fara .mdl)^", ^"Nume fisier preview (cu .html)^", ^"ONLY VIP (1/0)^"^n", "#In cazul in care nu doriti preview la skin scrieti in ghilimelele unde ar trebui sa fie numele fisierului ^"NOPREVIEW^".^n", "#Skinurile fiecarui player se salveaza pe SteamID.^n^n^n", "[MYSQL CONNECTION]^n^n", "SQL_HOSTNAME = ^n", "SQL_USERNAME = ^n", "SQL_PASSWORD = ^n", "SQL_DATABASE = ^n^n^n", "[SETTINGS]^n^n", "PREVIEW_MENU = 1 #Meniul pentru preview (0/1)^n", "MODELS_COUNTER = 1 #Textul din meniu care arata cate modele sunt.^n", "VIP_FLAG = t #Flag-ul VIP.^n^n^n", "[Terrorist]^n^n^n", "[Counter-Strike]^n^n^n" }; //////// //ENUM// //////// enum _:SQLDATA { MYSQL_HOST[32], MYSQL_USER[32], MYSQL_PASS[48], MYSQL_DB[32], } enum _:TEROR { szTModelName[64], szTModelLocation[64], szTModelPreview[64], szTSkin[64], iTVIPOnly, iTID } enum _:COUNTER_TERO { szCTModelName[64], szCTModelLocation[64], szCTModelPreview[64], szCTSkin[25], iCTVIPOnly, iCTID } enum _:PREFERENCES { MENU_PREVIEW, COUNTER_MODELS, FLAG_VIP[26] } enum { SETTINGS = 1, SQL_DATA, TERRORISTS, COUNTER_TERRORISTS } enum _:TEAMS { T, CT } ////////// //PLUGIN// ////////// new const g_szTag [] = "^4[CSGO Agents]^1"; new g_TSkin[MAX_SKINS][TEROR]; new g_CTSkin[MAX_SKINS][COUNTER_TERO]; new g_iCounterTotalSkins; new g_iTerorristTotalSkins; new g_iPlayerSkin[MAX_PLAYERS + 1][TEAMS]; new g_szAuthID[MAX_PLAYERS + 1][MAX_AUTHID_LENGTH]; new g_szSQlData[SQLDATA]; new g_iSettings[PREFERENCES]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_cvar("csgo_agents_wf", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY); register_clcmd("say", "say_hook"); register_clcmd("say_team", "say_hook"); register_clcmd("amx_agents", "agents_menu", _, "Open CSGO Agents menu"); RegisterHam(Ham_Spawn, "player", "player_spawn_post", 1); } public plugin_precache() { new szFileDirector[64], iFilePointer; get_configsdir(szFileDirector, charsmax(szFileDirector)); formatex(g_szFile, charsmax(g_szFile), "%s/%s", szFileDirector, g_szFileName); new iFile = file_exists(g_szFile); if(!iFile) { iFilePointer = fopen(g_szFile, "w"); new szFileData[512]; for(new i; i < sizeof(g_szFileInfo); i++) { formatex(szFileData, charsmax(szFileData), "%s", g_szFileInfo[i]); fputs(iFilePointer, szFileData); } fclose(iFilePointer); server_print(" "); server_print("-----------------------------------------"); server_print("[CSGO AGENTS] Config file has been created succesfully!"); server_print("[CSGO AGENTS] First of all config the plugin in ^"csgo_agents.cfg^""); server_print("-----------------------------------------"); server_print(" "); set_fail_state("Complete SQL informations."); } new szData[512]; new szString[124]; new szValue[124]; new szParseData[4][64]; new iSection; new szCfgDir[32]; new i = 0; new z = 0; iFilePointer = fopen(g_szFile, "rt"); if(!iFilePointer) { set_fail_state("File %s couldn't be opened!", g_szFile); } while(fgets(iFilePointer, szData, charsmax(szData))) { trim(szData); if(szData[0] == '#' || szData[0] == EOS || szData[0] == ';') { continue; } if(szData[0] == '[') { iSection += 1; continue; } switch(iSection) { case SQL_DATA: { strtok2(szData, szString, charsmax(szString), szValue, charsmax(szValue), '=', TRIM_INNER); if(szValue[0] == EOS || !szValue[0]) { set_fail_state("You must complete SQL data in configuration file!"); } if(equali(szString, SQL_HOSTNAME)) { copy(g_szSQlData[MYSQL_HOST], charsmax(g_szSQlData[MYSQL_HOST]), szValue); } if(equali(szString, SQL_USERNAME)) { copy(g_szSQlData[MYSQL_USER], charsmax(g_szSQlData[MYSQL_USER]), szValue); } if(equali(szString, SQL_PASSWORD)) { copy(g_szSQlData[MYSQL_PASS], charsmax(g_szSQlData[MYSQL_PASS]), szValue); } if(equali(szString, SQL_DATABASE)) { copy(g_szSQlData[MYSQL_DB], charsmax(g_szSQlData[MYSQL_DB]), szValue); } } case SETTINGS: { strtok2(szData, szString, charsmax(szString), szValue, charsmax(szValue), '=', TRIM_INNER); if(szValue[0] == EOS || !szValue[0]) continue; if(equal(szString, PREVIEW_MENU)) { g_iSettings[MENU_PREVIEW] = str_to_num(szValue); } if(equal(szString, MODELS_COUNTER)) { g_iSettings[COUNTER_MODELS] = str_to_num(szValue); } if(equal(szString, VIP_FLAG)) { copy(g_iSettings[FLAG_VIP], charsmax(g_iSettings[FLAG_VIP]), szValue); } } case TERRORISTS: { ++i; parse(szData, szParseData[0], charsmax(szParseData[]), szParseData[1], charsmax(szParseData[]), szParseData[2], charsmax(szParseData[]), szParseData[3], charsmax(szParseData[])); copy(g_TSkin[i-1][szTModelName], charsmax(g_TSkin[][szTModelName]), szParseData[0]); formatex(g_TSkin[i-1][szTModelPreview], charsmax(g_TSkin[][szTModelPreview]), "%s/%s/%s", szCfgDir, g_szMOTDFolder, szParseData[2]); formatex(g_TSkin[i-1][szTModelLocation], charsmax(g_TSkin[][szTModelLocation]), "models/player/%s/%s", szParseData[1], szParseData[1]); g_TSkin[i-1][iTVIPOnly] = str_to_num(szParseData[3]); if(g_TSkin[i-1][szTModelLocation][0] != EOS || g_TSkin[i-1][szTModelLocation][0]) precache_player_model(g_TSkin[i-1][szTModelLocation]); replace_all(g_TSkin[i-1][szTModelLocation], charsmax(g_TSkin[][szTModelLocation]), "/", " "); parse(g_TSkin[i-1][szTModelLocation], szParseData[0], charsmax(szParseData), szParseData[1], charsmax(szParseData), g_TSkin[i-1][szTSkin], charsmax(g_TSkin[][szTSkin])); g_TSkin[i-1][iTID] = i-1; ++g_iTerorristTotalSkins; } case COUNTER_TERRORISTS: { ++z; parse(szData, szParseData[0], charsmax(szParseData[]), szParseData[1], charsmax(szParseData[]), szParseData[2], charsmax(szParseData[]), szParseData[3], charsmax(szParseData[])); copy(g_CTSkin[z-1][szCTModelName], charsmax(g_CTSkin[][szCTModelName]), szParseData[0]); formatex(g_CTSkin[z-1][szCTModelPreview], charsmax(g_CTSkin[][szCTModelPreview]), "%s/%s/%s", szCfgDir, g_szMOTDFolder, szParseData[2]); formatex(g_CTSkin[z-1][szCTModelLocation], charsmax(g_CTSkin[][szCTModelLocation]), "models/player/%s/%s", szParseData[1], szParseData[1]); g_CTSkin[z-1][iCTVIPOnly] = str_to_num(szParseData[3]); if(g_CTSkin[z-1][szCTModelLocation][0] != EOS || g_CTSkin[z-1][szCTModelLocation][0]) precache_player_model(g_CTSkin[z-1][szCTModelLocation]); replace_all(g_CTSkin[z-1][szCTModelLocation], charsmax(g_CTSkin[][szCTModelLocation]), "/", " "); parse(g_CTSkin[z-1][szCTModelLocation], szParseData[0], charsmax(szParseData[]), szParseData[0], charsmax(szParseData[]), g_CTSkin[z-1][szCTSkin], charsmax(g_CTSkin[][szCTSkin])); g_CTSkin[z-1][iCTID] = z-1; ++g_iCounterTotalSkins; } } } fclose(iFilePointer); MySql_Init(); } public plugin_end() { SQL_FreeHandle(g_SqlTuple); } public MySql_Init() { g_SqlTuple = SQL_MakeDbTuple(g_szSQlData[MYSQL_HOST], g_szSQlData[MYSQL_USER], g_szSQlData[MYSQL_PASS], g_szSQlData[MYSQL_DB], .timeout = 60); new ErrorCode,Handle:SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,charsmax(g_Error)); if(SqlConnection == Empty_Handle) { set_fail_state(g_Error); } new Handle:Queries; new szQuery[1024]; formatex(szQuery, charsmax(szQuery), "CREATE TABLE IF NOT EXISTS %s ( `id` INT(11) NOT NULL AUTO_INCREMENT , `name` VARCHAR(33) NOT NULL , `steamid` VARCHAR(65) NOT NULL , `last_ct_agent` INT(4) NOT NULL , `last_t_agent` INT(4) NOT NULL , PRIMARY KEY (`id`))", g_szTable); Queries = SQL_PrepareQuery(SqlConnection, szQuery); if(!SQL_Execute(Queries)) { SQL_QueryError(Queries,g_Error,charsmax(g_Error)); set_fail_state(g_Error); } server_print("[%s] SQL Connection to server database has been realized succesfully!", g_szPluginName); SQL_FreeHandle(Queries); SQL_FreeHandle(SqlConnection); } /////////////////////////////////////////////// SQL /////////////////////////////////////////////// public client_authorized(id) { get_user_authid(id, g_szAuthID[id], charsmax(g_szAuthID[])); } public client_putinserver(id) { new szQuery[512]; new szData[1]; g_iPlayerSkin[id][T] = NON_USED_SKIN; g_iPlayerSkin[id][CT] = NON_USED_SKIN; szData[0] = id; formatex(szQuery, charsmax(szQuery), "SELECT * FROM `%s` WHERE `steamid` = '%s'", g_szTable, g_szAuthID[id]); SQL_ThreadQuery(g_SqlTuple, "CheckData", szQuery, szData, 1); } #if AMXX_VERSION_NUM < 183 public client_disconnect(id) #else public client_disconnected(id) #endif { g_iPlayerSkin[id][T] = 0; g_iPlayerSkin[id][CT] = 0; } public CheckData(FailState, Handle:Query, szError[], ErrorCode, szData[], iSize) { if(FailState || ErrorCode) { server_print(" "); server_print("[%s] SQL ERROR: %s", g_szPluginName, szError); server_print(" "); } if(SQL_NumResults(Query) > 0) { new id = szData[0]; g_iPlayerSkin[id][T] = SQL_ReadResult(Query, 4); g_iPlayerSkin[id][CT] = SQL_ReadResult(Query, 3); } } /////////////////////////////////////////////// SAY HOOK /////////////////////////////////////////////// public say_hook(id) { new szArg[192]; read_args(szArg, charsmax(szArg)); remove_quotes(szArg); if(equal(szArg, "/agents")) { agents_menu(id); } return PLUGIN_CONTINUE; } /////////////////////////////////////////////// MENU /////////////////////////////////////////////// public agents_menu(id) { new iMenu = menu_create("\r[CSGO Agents]\y Menu", "agents_menu_handler"); menu_additem(iMenu, "Terrorist Agents"); menu_additem(iMenu, "Counter-Terrorists Agents"); if(g_iSettings[MENU_PREVIEW] != 0) { menu_additem(iMenu, "Preview skins"); } if(g_iSettings[COUNTER_MODELS] != 0) { new skinCounter[36]; menu_addblank2(iMenu); if(g_iCounterTotalSkins != 0 && g_iTerorristTotalSkins != 0) { formatex(skinCounter, charsmax(skinCounter), "\dTerrorists Agents: %i", g_iTerorristTotalSkins); menu_addtext2(iMenu, skinCounter); formatex(skinCounter, charsmax(skinCounter), "\dCounter-Terrorists Agents: %i", g_iCounterTotalSkins); menu_addtext2(iMenu, skinCounter); formatex(skinCounter, charsmax(skinCounter), "\dTotal Agents: %i", g_iCounterTotalSkins + g_iTerorristTotalSkins); menu_addtext2(iMenu, skinCounter); } else { formatex(skinCounter, charsmax(skinCounter), "\dThere are no skins."); menu_addtext2(iMenu, skinCounter); } } menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, iMenu, 0); } public agents_menu_handler(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu); } switch(item) { case 0: terrorists_menu(id); case 1: counter_terrorists_menu(id); case 2: preview_menu(id); } } terrorists_menu(id) { new iMenu = menu_create("\r[CSGO Agents]\y Terrorists Agents", "terrorists_agents_menu_handler"); new szMenuItem[4][45]; if(g_iTerorristTotalSkins > 0) { formatex(szMenuItem[0], charsmax(szMenuItem[]), "Default Skin - \y [%s]", g_iPlayerSkin[id][T] == NON_USED_SKIN ? "ON" : "OFF"); menu_additem(iMenu, szMenuItem[0]); for (new i; i < g_iTerorristTotalSkins; i++) { if(g_TSkin[i][iTVIPOnly] == 0) { if(g_TSkin[i][iTID] == g_iPlayerSkin[id][T]) { formatex(szMenuItem[1], charsmax(szMenuItem[]), "%s \r[#]", g_TSkin[i][szTModelName]); menu_additem(iMenu, szMenuItem[1]); } else { menu_additem(iMenu, g_TSkin[i][szTModelName]); } } else { if(g_TSkin[i][iTID] == g_iPlayerSkin[id][T]) { formatex(szMenuItem[2], charsmax(szMenuItem[]), "%s - \y[VIP] \r[#]", g_TSkin[i][szTModelName]); menu_additem(iMenu, szMenuItem[2]); } else { formatex(szMenuItem[3], charsmax(szMenuItem[]), "%s - \y[VIP]", g_TSkin[i][szTModelName]); menu_additem(iMenu, szMenuItem[3]); } } } } else { formatex(szMenuItem[0], charsmax(szMenuItem[]), "\dThere are no models to choose from."); menu_addtext2(iMenu, szMenuItem[0]); } menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, iMenu, 0); } public terrorists_agents_menu_handler(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu); } if(item > g_iTerorristTotalSkins || item < 0) { return PLUGIN_HANDLED; } if(item == 0) { if(is_user_alive(id)) { hl_reset_player_model(id); client_print_color(id, print_team_default, "%s You choose^4 Default Skin^1!", g_szTag); } else { client_print_color(id, print_team_default, "%s You will be respawned with^4 Default Skin^1!", g_szTag); } g_iPlayerSkin[id][T] = NON_USED_SKIN; save_data_sql(id); return PLUGIN_HANDLED; } item -= 1; if(g_TSkin[item][iTVIPOnly] != 0 && !(get_user_flags(id) & read_flags(g_iSettings[FLAG_VIP]))) { client_print_color(id, print_team_default, "%s You can't choose this skin because you are not a ^4VIP^1!", g_szTag); return PLUGIN_HANDLED; } if(is_user_alive(id)) { if(get_user_team(id) == 1) hl_set_player_model(id, g_TSkin[item][szTSkin]); client_print_color(id, print_team_default, "%s You choose^4 %s^1 Agent!", g_szTag, g_TSkin[item][szTModelName]); } else { client_print_color(id, print_team_default, "%s You will be respawned with^4 %s^1 Agent Model!", g_szTag, g_TSkin[item][szTModelName]); } g_iPlayerSkin[id][T] = item; save_data_sql(id); return PLUGIN_CONTINUE; } counter_terrorists_menu(id) { new iMenu = menu_create("\r[CSGO Agents]\y Counter-Terrorists Agents", "counter_terrorists_agents_menu_handler"); new szMenuItem[4][45]; if(g_iCounterTotalSkins > 0) { formatex(szMenuItem[0], charsmax(szMenuItem[]), "Default Skin - \y [%s]", g_iPlayerSkin[id][CT] == NON_USED_SKIN ? "ON" : "OFF"); menu_additem(iMenu, szMenuItem[0]); for (new i; i < g_iCounterTotalSkins; i++) { if(g_CTSkin[i][iCTVIPOnly] == 0) { if(g_CTSkin[i][iCTID] == g_iPlayerSkin[id][CT]) { formatex(szMenuItem[1], charsmax(szMenuItem[]), "%s \r[#]", g_CTSkin[i][szCTModelName]); menu_additem(iMenu, szMenuItem[1]); } else { menu_additem(iMenu, g_CTSkin[i][szCTModelName]); } } else { if(g_CTSkin[i][iCTID] == g_iPlayerSkin[id][CT]) { formatex(szMenuItem[2], charsmax(szMenuItem[]), "%s - \y[VIP] \r[#]", g_CTSkin[i][szCTModelName]); menu_additem(iMenu, szMenuItem[2]); } else { formatex(szMenuItem[3], charsmax(szMenuItem[]), "%s - \y[VIP]", g_CTSkin[i][szCTModelName]); menu_additem(iMenu, szMenuItem[3]); } } } } else { formatex(szMenuItem[0], charsmax(szMenuItem[]), "\dThere are no models to choose from."); menu_addtext2(iMenu, szMenuItem[0]); } menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, iMenu, 0); } public counter_terrorists_agents_menu_handler(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu); } if(item == 0) { if(is_user_alive(id)) { hl_reset_player_model(id); client_print_color(id, print_team_default, "%s You choose^4 Default Skin^1!", g_szTag); } else { client_print_color(id, print_team_default, "%s You will be respawned with^4 Default Skin^1!", g_szTag); } g_iPlayerSkin[id][CT] = NON_USED_SKIN; save_data_sql(id); return PLUGIN_HANDLED; } if(item > g_iCounterTotalSkins || item < 0) { return PLUGIN_HANDLED; } item -= 1; if(g_CTSkin[item][iCTVIPOnly] != 0 && !(get_user_flags(id) & read_flags(g_iSettings[FLAG_VIP]))) { client_print_color(id, print_team_default, "%s You can't choose this skin because you are not a ^4VIP^1!", g_szTag); return PLUGIN_HANDLED; } if(is_user_alive(id)) { if(get_user_team(id) == 2) hl_set_player_model(id, g_CTSkin[item][szCTSkin]); client_print_color(id, print_team_default, "%s You choose^4 %s^1 Agent!", g_szTag, g_CTSkin[item][szCTModelName]); } else { client_print_color(id, print_team_default, "%s You will be respawned with^4 %s^1 Agent Model!", g_szTag, g_CTSkin[item][szCTModelName]); } g_iPlayerSkin[id][CT] = item; save_data_sql(id); return PLUGIN_CONTINUE; } preview_menu(id) { new iMenu = menu_create("\r[CSGO Agents]\y Preview Menu", "preview_menu_handler"); menu_additem(iMenu, "Terrorist Agents"); menu_additem(iMenu, "Counter-Terrorists Agents"); menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, iMenu, 0); } public preview_menu_handler(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu); } switch(item) { case 0: preview_terrorist_agents(id); case 1: preview_counter_terrorist_agents(id); } } public preview_terrorist_agents(id) { new iMenu = menu_create("\r[CSGO Agents]\y Terrorists Agents", "terrorists_preview_menu_handler"); new szMsg[45]; if(g_iTerorristTotalSkins > 0) { for (new i; i < g_iTerorristTotalSkins; i++) { menu_additem(iMenu, g_TSkin[i][szTModelName]); } } else { formatex(szMsg, charsmax(szMsg), "\dThere are no models to see preview of."); menu_addtext2(iMenu, szMsg); } menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, iMenu, 0); } public terrorists_preview_menu_handler(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu); } if(contain(g_TSkin[item][szTModelPreview], "NOPREVIEW") != -1) { client_print_color(id, print_team_default, "%s Agent ^4%s^1 does not have a preview!", g_szTag, g_TSkin[item][szTModelName]); return PLUGIN_HANDLED; } show_motd(id, g_CTSkin[item][szCTModelPreview]); preview_terrorist_agents(id); return PLUGIN_CONTINUE; } public preview_counter_terrorist_agents(id) { new iMenu = menu_create("\r[CSGO Agents]\y Counter-Terrorists Agents", "counter_terrorists_preview_menu_handler"); new szMsg[45]; if(g_iCounterTotalSkins > 0) { for (new i; i < g_iCounterTotalSkins; i++) { menu_additem(iMenu, g_CTSkin[i][szCTModelName]); } } else { formatex(szMsg, charsmax(szMsg), "\dThere are no models to see preview of."); menu_addtext2(iMenu, szMsg); } menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, iMenu, 0); } public counter_terrorists_preview_menu_handler(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu); } if(contain(g_CTSkin[item][szCTModelPreview], "NOPREVIEW") != -1) { client_print_color(id, print_team_default, "%s Agent ^4%s^1 does not have a preview!", g_szTag, g_CTSkin[item][szCTModelName]); return PLUGIN_HANDLED; } show_motd(id, g_CTSkin[item][szCTModelPreview]); preview_counter_terrorist_agents(id); return PLUGIN_CONTINUE; } public player_spawn_post(id) { if(is_user_alive(id)) { hl_reset_player_model(id); if((get_user_team(id) == 1 && g_iPlayerSkin[id][T] == NON_USED_SKIN) || (get_user_team(id) == 2 && g_iPlayerSkin[id][CT] == NON_USED_SKIN)) { return PLUGIN_HANDLED; } switch(get_user_team(id)) { case 1: { new iSkin = g_iPlayerSkin[id][T]; hl_set_player_model(id, g_TSkin[iSkin][szCTSkin]); } case 2: { new iSkin = g_iPlayerSkin[id][CT]; hl_set_player_model(id, g_CTSkin[iSkin][szCTSkin]); } } } return PLUGIN_CONTINUE; } public FreeHandle(FailState, Handle:Query, szError[], ErrorCode, szData[], iSize) { if(FailState || ErrorCode) { server_print(" "); server_print("[%s] SQL ERROR: %s", szError, g_szPluginName); server_print(" "); } SQL_FreeHandle(Query); } public save_data_sql(id) { new szQuery[512]; new szData[1]; szData[0] = id; formatex(szQuery, charsmax(szQuery), "SELECT * FROM `%s` WHERE `steamid` = '%s'", g_szTable, g_szAuthID[id]); SQL_ThreadQuery(g_SqlTuple, "SaveData", szQuery, szData, 1); } public SaveData(FailState, Handle:Query, szError[], ErrorCode, szData[], iSize) { if(FailState || ErrorCode) { server_print(" "); server_print("[%s] SQL ERROR: %s", szError, g_szPluginName); server_print(" "); } new szQuery[512]; new id = szData[0]; if(SQL_NumResults(Query) < 1) { new szName[MAX_NAME_LENGTH]; get_user_name(id, szName, charsmax(szName)); formatex(szQuery, charsmax(szQuery), "INSERT INTO `%s` (`name`,`steamid`,`last_ct_agent`,`last_t_agent`) VALUES ('%s','%s','%i','%i')", g_szTable, szName, g_szAuthID[id], g_iPlayerSkin[id][CT], g_iPlayerSkin[id][T]); SQL_ThreadQuery(g_SqlTuple, "FreeHandle", szQuery); } else { formatex(szQuery, charsmax(szQuery), "UPDATE `%s` SET `last_ct_agent`='%i', `last_t_agent`='%i' WHERE `steamid` = '%s'", g_szTable, g_iPlayerSkin[id][CT], g_iPlayerSkin[id][T], g_szAuthID[id]); SQL_ThreadQuery(g_SqlTuple, "FreeHandle", szQuery); } } precache_player_model(const szModel[], &id = 0) { new model[128]; formatex(model, charsmax(model), "%sT.mdl", szModel); if(file_exists(model)) id = precache_generic(model); static const extension[] = "T.mdl"; #pragma unused extension copy(model[strlen(model) - charsmax(extension)], charsmax(model), ".mdl"); return precache_model(model); } Przeczytaj cały wpis
  4. Descriptionno longer be in "going to die" status, by simply set the entprop after taking damage or revived. then, the character no longer complains, and taking damage no longer miss 1.0 health. HAVE TO USE No Extra 1.0 Health Buffer When "Going To Die" to fix health! Change log Spoiler Code: 1.0 (2023-06-29: init public release. Attached Files Get Plugin or Get Source (remove_going_to_die_status.sp - 2.4 KB) Wyświetl pełny artykuł
  5. I'm using this method of replacing models with REAPI. It works fine but I would like that only people with the flag ADMIN_IMMUNITY can use the models when they type /guns in chat. Also, is there a way that if the player buys or picks up a shield the model gets set to default? PHP Code: #include <amxmodx> #include <reapi> #define PLUGIN "[Reapi] Replace Weapon Models" #define VERSION "1.0" #define AUTHOR "[N]drs" #define rg_get_weapon_id(%0) get_member(get_member(get_member(%0, m_pPlayer), m_pActiveItem), m_iId) new const szV_Model[] = "models/custom/v_usp.mdl" new const szP_Model[] = "models/custom/p_usp.mdl" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHookChain(RG_CBasePlayerWeapon_DefaultDeploy, "OnPlayerChangeWeapon_Pre", false) } public plugin_precache() { precache_model(szV_Model) precache_model(szP_Model) } public OnPlayerChangeWeapon_Pre(const iEntity, szViewModel[], szWeaponModel[]) { switch(rg_get_weapon_id(iEntity)) { case CSW_USP: { SetHookChainArg(2, ATYPE_STRING, szV_Model) SetHookChainArg(3, ATYPE_STRING, szP_Model) } } return HC_CONTINUE } Another question: Is this method (REAPI) better than using Item Deploy in terms of cpu usage and performance? Thanks! Przeczytaj cały wpis
  6. MYGO.pl

    RSSDelete

    Delete pleaste, wrong forum. Thanks! Przeczytaj cały wpis
  7. Hello, im newbie trying to mod L4D2! I need some help, i still confused about 8+ Survivor Mod i followed this mod https://forums.alliedmods.net/showthread.php?p=2769714 https://forums.alliedmods.net/showthread.php?p=999861 but when i asked to my friend he said the server still on 4 for max player, i already learning and figure for 3 days until now. please i beg someone who understand how to make 8 player server help me out. I'm used Linux Ubuntu 20.04 TLS Server Wyświetl pełny artykuł
  8. MYGO.pl

    RSSmap

    hello I wanted to edit the mapmenu plugin i want to add this menu to the winning map Do you want to change it right now? Yes, change it now! Change it just nextmap... Don't change it! PHP Code: // vim: set ts=4 sw=4 tw=99 noet: // // AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). // Copyright (C) The AMX Mod X Development Team. // // This software is licensed under the GNU General Public License, version 3 or higher. // Additional exceptions apply. For full license details, see LICENSE.txt or visit: // https://alliedmods.net/amxmodx-license // // Maps Menu Plugin // #include <amxmodx> #include <amxmisc> new Array:g_mapName; new g_mapNums new g_menuPosition[MAX_PLAYERS + 1] new g_voteCount[5] new g_voteSelected[MAX_PLAYERS + 1][4] new g_voteSelectedNum[MAX_PLAYERS + 1] new g_coloredMenus new g_choosed public plugin_init() { register_plugin("Maps Menu", AMXX_VERSION_STR, "AMXX Dev Team") register_dictionary("mapsmenu.txt") register_dictionary("common.txt") register_clcmd("amx_mapmenu", "cmdMapsMenu", ADMIN_MAP, "- displays changelevel menu") register_clcmd("amx_votemapmenu", "cmdVoteMapMenu", ADMIN_VOTE, "- displays votemap menu") register_menucmd(register_menuid("Changelevel Menu"), 1023, "actionMapsMenu") register_menucmd(register_menuid("Which map do you want?"), 527, "voteCount") register_menucmd(register_menuid("Change map to"), 527, "voteCount") register_menucmd(register_menuid("Votemap Menu"), 1023, "actionVoteMapMenu") register_menucmd(register_menuid("The winner: "), 3, "actionResult") g_mapName=ArrayCreate(32); new maps_ini_file[64]; get_configsdir(maps_ini_file, charsmax(maps_ini_file)); format(maps_ini_file, charsmax(maps_ini_file), "%s/maps.ini", maps_ini_file); if (!file_exists(maps_ini_file)) get_cvar_string("mapcyclefile", maps_ini_file, charsmax(maps_ini_file)); if (!file_exists(maps_ini_file)) format(maps_ini_file, charsmax(maps_ini_file), "mapcycle.txt") load_settings(maps_ini_file) g_coloredMenus = colored_menus() } public autoRefuse() { log_amx("Vote: %L", "en", "RESULT_REF") client_print(0, print_chat, "%L", LANG_PLAYER, "RESULT_REF") } public actionResult(id, key) { remove_task(4545454) switch (key) { case 0: { new _modName[10] get_modname(_modName, charsmax(_modName)) if (!equal(_modName, "zp")) { message_begin(MSG_ALL, SVC_INTERMISSION) message_end() } new tempMap[32]; ArrayGetString(g_mapName, g_choosed, tempMap, charsmax(tempMap)); set_task(2.0, "delayedChange", 0, tempMap, strlen(tempMap) + 1) log_amx("Vote: %L", "en", "RESULT_ACC") client_print(0, print_chat, "%L", LANG_PLAYER, "RESULT_ACC") } case 1: autoRefuse() } return PLUGIN_HANDLED } public checkVotes(id) { id -= 34567 new num, ppl[MAX_PLAYERS], a = 0 get_players(ppl, num, "c") if (num == 0) num = 1 g_choosed = -1 for (new i = 0; i < g_voteSelectedNum[id]; ++i) if (g_voteCount[a] < g_voteCount[i]) a = i new votesNum = g_voteCount[0] + g_voteCount[1] + g_voteCount[2] + g_voteCount[3] + g_voteCount[4] new iRatio = votesNum ? floatround(get_cvar_float("amx_votemap_ratio") * float(votesNum), floatround_ceil) : 1 new iResult = g_voteCount[a] if (iResult >= iRatio) { g_choosed = g_voteSelected[id][a] new tempMap[32]; ArrayGetString(g_mapName, g_choosed, tempMap, charsmax(tempMap)); client_print(0, print_chat, "%L %s", LANG_PLAYER, "VOTE_SUCCESS", tempMap); log_amx("Vote: %L %s", "en", "VOTE_SUCCESS", tempMap); } if (g_choosed != -1) { if (is_user_connected(id)) { new menuBody[512] new tempMap[32]; ArrayGetString(g_mapName, g_choosed, tempMap, charsmax(tempMap)); new len = format(menuBody, charsmax(menuBody), g_coloredMenus ? "\y%L: \w%s^n^n" : "%L: %s^n^n", id, "THE_WINNER", tempMap) len += format(menuBody[len], charsmax(menuBody) - len, g_coloredMenus ? "\y%L^n\w" : "%L^n", id, "WANT_CONT") format(menuBody[len], charsmax(menuBody) - len, "^n1. %L^n2. %L", id, "YES", id, "NO") show_menu(id, 0x03, menuBody, 10, "The winner: ") set_task(10.0, "autoRefuse", 4545454) } else { new _modName[10] get_modname(_modName, charsmax(_modName)) if (!equal(_modName, "zp")) { message_begin(MSG_ALL, SVC_INTERMISSION) message_end() } new tempMap[32]; ArrayGetString(g_mapName, g_choosed, tempMap, charsmax(tempMap)); set_task(2.0, "delayedChange", 0, tempMap, strlen(tempMap) + 1) } } else { client_print(0, print_chat, "%L", LANG_PLAYER, "VOTE_FAILED") log_amx("Vote: %L", "en", "VOTE_FAILED") } remove_task(34567 + id) } public voteCount(id, key) { if (key > 3) { client_print(0, print_chat, "%L", LANG_PLAYER, "VOT_CANC") remove_task(34567 + id) set_cvar_float("amx_last_voting", get_gametime()) log_amx("Vote: Cancel vote session") return PLUGIN_HANDLED } if (get_cvar_float("amx_vote_answers")) { new name[MAX_NAME_LENGTH] get_user_name(id, name, charsmax(name)) client_print(0, print_chat, "%L", LANG_PLAYER, "X_VOTED_FOR", name, key + 1) } ++g_voteCount[key] return PLUGIN_HANDLED } isMapSelected(id, pos) { for (new a = 0; a < g_voteSelectedNum[id]; ++a) if (g_voteSelected[id][a] == pos) return 1 return 0 } displayVoteMapsMenu(id, pos) { if (pos < 0) return new menuBody[512], b = 0, start = pos * 7 if (start >= g_mapNums) start = pos = g_menuPosition[id] = 0 new len = format(menuBody, charsmax(menuBody), g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, "VOTEMAP_MENU", pos + 1, (g_mapNums / 7 + ((g_mapNums % 7) ? 1 : 0))) new end = start + 7, keys = MENU_KEY_0 if (end > g_mapNums) end = g_mapNums new tempMap[32]; for (new a = start; a < end; ++a) { ArrayGetString(g_mapName, a, tempMap, charsmax(tempMap)); if (g_voteSelectedNum[id] == 4 || isMapSelected(id, pos * 7 + b)) { ++b if (g_coloredMenus) len += format(menuBody[len], charsmax(menuBody) - len, "\d%d. %s^n\w", b, tempMap) else len += format(menuBody[len], charsmax(menuBody) - len, "#. %s^n", tempMap) } else { keys |= (1<<b) len += format(menuBody[len], charsmax(menuBody) - len, "%d. %s^n", ++b, tempMap) } } if (g_voteSelectedNum[id]) { keys |= MENU_KEY_8 len += format(menuBody[len], charsmax(menuBody) - len, "^n8. %L^n", id, "START_VOT") } else len += format(menuBody[len], charsmax(menuBody) - len, g_coloredMenus ? "^n\d8. %L^n\w" : "^n#. %L^n", id, "START_VOT") if (end != g_mapNums) { len += format(menuBody[len], charsmax(menuBody) - len, "^n9. %L...^n0. %L^n", id, "MORE", id, pos ? "BACK" : "EXIT") keys |= MENU_KEY_9 } else len += format(menuBody[len], charsmax(menuBody) - len, "^n0. %L^n", id, pos ? "BACK" : "EXIT") if (g_voteSelectedNum[id]) len += format(menuBody[len], charsmax(menuBody) - len, g_coloredMenus ? "^n\y%L:^n\w" : "^n%L:^n", id, "SEL_MAPS") else len += format(menuBody[len], charsmax(menuBody) - len, "^n^n") for (new c = 0; c < 4; c++) { if (c < g_voteSelectedNum[id]) { ArrayGetString(g_mapName, g_voteSelected[id][c], tempMap, charsmax(tempMap)); len += format(menuBody[len], charsmax(menuBody) - len, "%s^n", tempMap) } else len += format(menuBody[len], charsmax(menuBody) - len, "^n") } new menuName[64] format(menuName, charsmax(menuName), "%L", "en", "VOTEMAP_MENU") show_menu(id, keys, menuBody, -1, menuName) } public cmdVoteMapMenu(id, level, cid) { if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED if (get_cvar_float("amx_last_voting") > get_gametime()) { client_print(id, print_chat, "%L", id, "ALREADY_VOT") return PLUGIN_HANDLED } g_voteSelectedNum[id] = 0 if (g_mapNums) { displayVoteMapsMenu(id, g_menuPosition[id] = 0) } else { console_print(id, "%L", id, "NO_MAPS_MENU") client_print(id, print_chat, "%L", id, "NO_MAPS_MENU") } return PLUGIN_HANDLED } public cmdMapsMenu(id, level, cid) { if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED if (g_mapNums) { displayMapsMenu(id, g_menuPosition[id] = 0) } else { console_print(id, "%L", id, "NO_MAPS_MENU") client_print(id, print_chat, "%L", id, "NO_MAPS_MENU") } return PLUGIN_HANDLED } public delayedChange(mapname[]) { engine_changelevel(mapname) } public actionVoteMapMenu(id, key) { new tempMap[32]; switch (key) { case 7: { new Float:voting = get_cvar_float("amx_last_voting") if (voting > get_gametime()) { client_print(id, print_chat, "%L", id, "ALREADY_VOT") return PLUGIN_HANDLED } if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) { client_print(id, print_chat, "%L", id, "VOT_NOW_ALLOW") return PLUGIN_HANDLED } g_voteCount = {0, 0, 0, 0, 0} new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 set_cvar_float("amx_last_voting", get_gametime() + vote_time) new iVoteTime = floatround(vote_time) set_task(vote_time, "checkVotes", 34567 + id) new menuBody[512] new players[MAX_PLAYERS] new pnum, keys, len get_players(players, pnum) if (g_voteSelectedNum[id] > 1) { len = format(menuBody, charsmax(menuBody), g_coloredMenus ? "\y%L^n\w^n" : "%L^n^n", id, "WHICH_MAP") for (new c = 0; c < g_voteSelectedNum[id]; ++c) { ArrayGetString(g_mapName, g_voteSelected[id][c], tempMap, charsmax(tempMap)); len += format(menuBody[len], charsmax(menuBody) - len, "%d. %s^n", c + 1, tempMap) keys |= (1<<c) } keys |= (1<<8) len += format(menuBody[len], charsmax(menuBody) - len, "^n9. %L^n", id, "NONE") } else { ArrayGetString(g_mapName, g_voteSelected[id][0], tempMap, charsmax(tempMap)); len = format(menuBody, charsmax(menuBody), g_coloredMenus ? "\y%L^n%s?^n\w^n1. %L^n2. %L^n" : "%L^n%s?^n^n1. %L^n2. %L^n", id, "CHANGE_MAP_TO", tempMap, id, "YES", id, "NO") keys = MENU_KEY_1|MENU_KEY_2 } new menuName[64] format(menuName, charsmax(menuName), "%L", "en", "WHICH_MAP") for (new b = 0; b < pnum; ++b) if (players[b] != id) show_menu(players[b], keys, menuBody, iVoteTime, menuName) format(menuBody[len], charsmax(menuBody), "^n0. %L", id, "CANC_VOTE") keys |= MENU_KEY_0 show_menu(id, keys, menuBody, iVoteTime, menuName) new authid[32], name[MAX_NAME_LENGTH] get_user_authid(id, authid, charsmax(authid)) get_user_name(id, name, charsmax(name)) show_activity_key("ADMIN_V_MAP_1", "ADMIN_V_MAP_2", name); new tempMapA[32]; new tempMapB[32]; new tempMapC[32]; new tempMapD[32]; if (g_voteSelectedNum[id] > 0) { ArrayGetString(g_mapName, g_voteSelected[id][0], tempMapA, charsmax(tempMapA)); } else { copy(tempMapA, charsmax(tempMapA), ""); } if (g_voteSelectedNum[id] > 1) { ArrayGetString(g_mapName, g_voteSelected[id][1], tempMapB, charsmax(tempMapB)); } else { copy(tempMapB, charsmax(tempMapB), ""); } if (g_voteSelectedNum[id] > 2) { ArrayGetString(g_mapName, g_voteSelected[id][2], tempMapC, charsmax(tempMapC)); } else { copy(tempMapC, charsmax(tempMapC), ""); } if (g_voteSelectedNum[id] > 3) { ArrayGetString(g_mapName, g_voteSelected[id][3], tempMapD, charsmax(tempMapD)); } else { copy(tempMapD, charsmax(tempMapD), ""); } log_amx("Vote: ^"%s<%d><%s><>^" vote maps (map#1 ^"%s^") (map#2 ^"%s^") (map#3 ^"%s^") (map#4 ^"%s^")", name, get_user_userid(id), authid, tempMapA, tempMapB, tempMapC, tempMapD) } case 8: displayVoteMapsMenu(id, ++g_menuPosition[id]) case 9: displayVoteMapsMenu(id, --g_menuPosition[id]) default: { g_voteSelected[id][g_voteSelectedNum[id]++] = g_menuPosition[id] * 7 + key displayVoteMapsMenu(id, g_menuPosition[id]) } } return PLUGIN_HANDLED } public actionMapsMenu(id, key) { switch (key) { case 8: displayMapsMenu(id, ++g_menuPosition[id]) case 9: displayMapsMenu(id, --g_menuPosition[id]) default: { new a = g_menuPosition[id] * 8 + key new _modName[10] get_modname(_modName, charsmax(_modName)) if (!equal(_modName, "zp")) { message_begin(MSG_ALL, SVC_INTERMISSION) message_end() } new authid[32], name[MAX_NAME_LENGTH] get_user_authid(id, authid, charsmax(authid)) get_user_name(id, name, charsmax(name)) new tempMap[32]; ArrayGetString(g_mapName, a, tempMap, charsmax(tempMap)); show_activity_key("ADMIN_CHANGEL_1", "ADMIN_CHANGEL_2", name, tempMap); log_amx("Cmd: ^"%s<%d><%s><>^" changelevel ^"%s^"", name, get_user_userid(id), authid, tempMap) set_task(2.0, "delayedChange", 0, tempMap, strlen(tempMap) + 1) /* displayMapsMenu(id, g_menuPosition[id]) */ } } return PLUGIN_HANDLED } displayMapsMenu(id, pos) { if (pos < 0) return new menuBody[512] new tempMap[32] new start = pos * 8 new b = 0 if (start >= g_mapNums) start = pos = g_menuPosition[id] = 0 new len = format(menuBody, charsmax(menuBody), g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, "CHANGLE_MENU", pos + 1, (g_mapNums / 8 + ((g_mapNums % 8) ? 1 : 0))) new end = start + 8 new keys = MENU_KEY_0 if (end > g_mapNums) end = g_mapNums for (new a = start; a < end; ++a) { keys |= (1<<b) ArrayGetString(g_mapName, a, tempMap, charsmax(tempMap)); len += format(menuBody[len], charsmax(menuBody) - len, "%d. %s^n", ++b, tempMap) } if (end != g_mapNums) { format(menuBody[len], charsmax(menuBody) - len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT") keys |= MENU_KEY_9 } else format(menuBody[len], charsmax(menuBody) - len, "^n0. %L", id, pos ? "BACK" : "EXIT") new menuName[64] format(menuName, 63, "%L", "en", "CHANGLE_MENU") show_menu(id, keys, menuBody, -1, menuName) } stock bool:ValidMap(mapname[]) { if ( is_map_valid(mapname) ) { return true; } // If the is_map_valid check failed, check the end of the string new len = strlen(mapname) - 4; // The mapname was too short to possibly house the .bsp extension if (len < 0) { return false; } if ( equali(mapname[len], ".bsp") ) { // If the ending was .bsp, then cut it off. // the string is byref'ed, so this copies back to the loaded text. mapname[len] = '^0'; // recheck if ( is_map_valid(mapname) ) { return true; } } return false; } load_settings(filename[]) { new fp = fopen(filename, "r"); if (!fp) { return 0; } new text[256]; new tempMap[32]; while (fgets(fp, text, charsmax(text))) { if (text[0] == ';') { continue; } if (parse(text, tempMap, charsmax(tempMap)) < 1) { continue; } if (!ValidMap(tempMap)) { continue; } ArrayPushString(g_mapName, tempMap); g_mapNums++; } fclose(fp); return 1; } public plugin_end() { ArrayDestroy(g_mapName) } Przeczytaj cały wpis
  9. Hello, is there any plugin that connected with bot or somthing like that basicly i want a plugin that give you ability to ban someone in cs 1.6 server from the discord server like when you go discord server and type /ban Name/SteamID/IP time he will be banned in the cs 1.6 server Przeczytaj cały wpis
  10. Description: This plugin gives players effects/conditions in the bonus round Cvars: PHP Code: sm_brpe_version // version cvar - do not edit sm_brpe_enabled 1 // enable/disable this plugin sm_brpe_adminflag o // Admin flag to use for immunity (only one). Must be in char format. Default: o sm_brpe_mode 0 // 0 - effects are applied to everybody. 1 - only to players with the admin flag. 2 - to all winners plus losers with the admin flag. 3 - to all losers plus winners with the admin flag. Default: 0 sm_brpe_winners_effect 52 // Condition from TFCond enum - applied to the players on the winning team. 0 - do nothing. Default: 52 MAKE SURE THE CONDITION EXISTS IN THE tf2.inc FILE sm_brpe_loserss_effect 24 // Condition from TFCond enum - applied to the players on the losing team. 0 - do nothing. Default: 24 MAKE SURE THE CONDITION EXISTS IN THE tf2.inc FILE sm_brpe_winners_effect_duration 0 // Duration of the effect, applied to the players on the winning team. 0 - max duration. Default: 0 sm_brpe_loserss_effect_duration 0 // Duration of the effect, applied to the players on the losing team. 0 - max duration. Default: 0 Installation: Autogenerates a .cfg file in cfg\sourcemod when you load it for the first time. Download the plugin(or the source and compile it yourself) Put the .smx file in tf\addons\sourcemod\plugins Restart the server or load the plugin manually Changelog: 1.00 - initial version Github - link Attached Files Get Plugin or Get Source (BonusRoundPlayerEffects.sp - 6.9 KB) Wyświetl pełny artykuł
  11. Description SourceMod plugin that exposes many VScript features to make use of it. Currently supports CS:GO, L4D2, and TF2. More game support can be added to gamedata if requested. Features You can read all features plugin has at vscript.inc, but some noticeable features include:Creating SDKCall and DynamicDetour handle from native function, with parameter and return infos auto filled. Do not need gamedata signature for address of function. Creating new native function for vscript to use. Managing with HSCRIPT objects. Compiling and Executing a vscript code with parameters and returns passed. You can find some code examples in readme. ConVarsvscript_version: Current version, no touchie. DependenciesAt least SourceMod version 1.12.0.6924, for vscript library sourcescramble Source Code All build package for download Wyświetl pełny artykuł
  12. Required AMX Mod X version: >= 1.9 Description: This plugin adds api where you can integrate this vip system with your 3rd party plugins and put your vips inside "vipovi.ini" which is located in configs folder. Available cvar commands: amx_vip_log 1/0 = On/Off Log vip connections including failed logins and successfully (Logs player's nickname, steamid and IP address) This is useful if you wish to see if someone is using someone's privileges. amx_vip_logfile default is "VipKonekcije.log" Plugin API: has_player_vip_privileges(index) // return true if player is vip or false has_player_vip_flag(index, const flags[]) // Return true if player has specific flags or false Available commands: - Say /vips - see list of connected vip players - VIP Players have VIP tag in scoreboard by default. How do you add new vips: Currently it is supported by nick and steamid only. Nick + password and Steamid + password (IP address not implemented yet) Flags: abcdefghijklmnopqrstu Account flags: a = Disconnect player for invalid password b = This is clan tag (Not yet implemented function) c = This is steamid/wonid d = This is IP e = Password is not checked. Example: "Riste" "password" "abcdefghijklmnopqrstu" "a" // This will kick me if i don't have password in my setinfo _pw. Attached Files Get Plugin or Get Source (vip_core.sma - 7.5 KB) vip_core.amxx (6.0 KB) vip_core.inc (292 Bytes) Przeczytaj cały wpis
  13. - Description Light RPG allows players to quickly gain XP by damaging and killing enemies. Max HP, armor, damage and movement speed are increasing as the player levels up. Everything can be configured through a unique configuration file. Heavily inspired by CSO's Zombie Scenario gamemode experience system. - Requirements SourceMod 1.11+ - Changelog Quote: 2023-06-24 (v1.0.1) * Fix missing death notices. 2023-05-28 (v1.0.0) * Initial release. - Installation instructions Download lightrpg_v1.0.1.zip and extract it to your server's cstrike folder. Configuration file lightrpg.cfg can be found in addons/sourcemod/configs and edited to fit your needs. Lines are commented with relevant information. Translations are supported and english is provided in lightrpg.phrases.txt under addons/sourcemod/translations. - Media Few rounds of Zombie Riot with Light RPG: - Source code Available as an attachment and on GitHub. - Notes The plugin was made with Greyscale's Zombie Riot plugin in mind. The idea was to add a small twist to the gameplay without going overboard. I didn't intend to release it as this was initially a personal playground to learn SourceMod scripting but as the plugin grew I thought it would be a good idea to go all the way to a release. Attached Files lightrpg_v1.0.1.zip (39.3 KB) lightrpg_v1.0.1_source.zip (5.6 KB) Wyświetl pełny artykuł
  14. Hi, I've looked everywhere but can't find something similar to what I'm looking for: Is there a way that when playing Soccer Jam with a 20 goals winning score, if both teams are tied 19-19 they are given the choice to go to penalties? Sj-pro already has a feature to choose goalkeepers, so each team would have a goalkeeper. The idea is that 5 random players from each team are chosen to kick the penalty until one of the teams wins. I know it is complicated but I'm even willing to pay (Hopefully via PayPal) for it. Thanks! Przeczytaj cały wpis
  15. Hello everybuddy ! I have this plugin for cs1.6 which allow the player to revive his dead teammate by stopping near his boddy and Keep pressing "E" for 5 sec .. then he will be revived for 1 time only but when i try compile it using amxmodx studio it gives me many errors , so i came here to show you it and hope someone help me on fixing that plugin please I will attach down the SMA file and Include file too Attached Files Get Plugin or Get Source (revive_teammates.sma - 29.3 KB) emma_jule.inc (14.8 KB) ReviveTeammates.cfg (4.1 KB) Przeczytaj cały wpis
  16. server.cfg to compliment this plugin: Code: // Gameplay sm_cvar scavenge_round_setup_time 65535 sm_cvar survivor_revive_health 100 sm_cvar survivor_max_incapacitated_count 1 sm_cvar z_ghost_delay_min 18 sm_cvar z_ghost_delay_max 25 sm_cvar z_ghost_speed 900 sm_cvar vs_max_team_switches 5 sm_cvar l4d2_karma_charge_slowmode 1 sm_cvar sv_vote_plr_map_limit 69 sm_cvar sv_vote_command_delay 0 sm_cvar sv_vote_creation_timer 10 sm_cvar l4d_takeover_manualincap 0 sm_cvar l4d_climb_team 3Plugins to compliment this plugin: https://forums.alliedmods.net/showthread.php?t=161280 https://forums.alliedmods.net/showthread.php?t=336225 https://forums.alliedmods.net/showthread.php?p=2499388 https://forums.alliedmods.net/showthread.php?p=2422153 https://forums.alliedmods.net/showthread.php?p=1192594 Attached Files Get Plugin or Get Source (ScavengeHardcore.sp - 10.1 KB) Wyświetl pełny artykuł
  17. I want to change the hud rank text in this entry, but I don't know how https://forums.alliedmods.net/showth...ight=ShowStats Przeczytaj cały wpis
  18. DescriptionSimply increase 1.0 damage if the hit cause the survivor be "going to die". Change log Spoiler Code: 1.0 (2023-06-21: init public release. Attached Files Get Plugin or Get Source (no_extra_health_buffer_when_going_to_die.sp - 1.9 KB) Wyświetl pełny artykuł
  19. DescriptionBlind a player(s) with a grenade flash (I only tested in checkpoint mode). Commandssm_flash nade flash player: <#userid|name> <duration> Changelog20/06/2023 (1.4) Initial release. Attached Files Get Plugin or Get Source (flashplayer.sp - 2.8 KB) Wyświetl pełny artykuł
  20. MYGO.pl

    RSSHelp Me Plz!

    Hello. I would like some modifications to the plugin mentioned below. When players type "/afk" and enter the system, the screen should become transparently red, but the game should still be visible. When players type "/afk" and exit the system, the screen should return to normal. The plugin I mentioned is: #pragma semicolon 1 #include <amxmodx> #include <reapi> new bool:g_blPlayerAFK[MAX_PLAYERS+1]; public plugin_init(){ register_plugin("Is Player AFK", "0.1", "` BesTCore;"); /*Duzenleme: By.KinG*/ RegisterHookChain(RG_CBasePlayer_Spawn, "RG_CBasePlayer_Spawn_Post", .post = true); register_clcmd("say /afk", "clcmd_afk"); register_clcmd("say", "clcmd_say"); register_clcmd("say_team", "clcmd_say"); } public clcmd_say(const id){ if(g_blPlayerAFK[id]){ client_print_color(id, id, "^3Afk sisteminde olduğunuz için mesajlaşamazsınız, çıkış yapmak için ^4/afk^3 yazınız."); show_hudmessage(id, "^3Afk sisteminde olduğunuz için mesajlaşamazsınız, çıkış yapmak için ^4/afk^3 yazınız.", 0.45, 0.05, 1.0, 1.0, 0, 0.1, 1.0); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } public RG_CBasePlayer_Spawn_Post(const id){ if(get_member(id, m_bJustConnected)){ return; } if(g_blPlayerAFK[id]){ set_task(5.0, "UserKill", id); } } public UserKill(id){ client_print_color(id, id, "^3Afk sisteminde olduğunuz için slaylandınız, çıkış yapmak için ^4/afk^3 yazınız."); show_hudmessage(id, "^3Afk sisteminde olduğunuz için slaylandınız, çıkış yapmak için ^4/afk^3 yazınız.", 0.45, 0.05, 1.0, 1.0, 0, 0.1, 1.0); user_kill(id, 1); set_entvar(id, var_frags, 0.0); set_member(id, m_iDeaths, 0); } public clcmd_afk(const id){ if(g_blPlayerAFK[id]){ client_print_color(id, id, "^3Başarılı bir şekilde afk sisteminden çıkış yaptınız."); show_hudmessage(id, "^3Başarılı bir şekilde afk sisteminden çıkış yaptınız.", 0.45, 0.05, 1.0, 1.0, 0, 0.1, 1.0); g_blPlayerAFK[id] = false; return PLUGIN_HANDLED; } else { g_blPlayerAFK[id] = true; client_print_color(id, id, "^3Afk sistemine giriş yaptınız, her el başı slaylanacak ve artık mesaj atamayacaksınız."); show_hudmessage(id, "^3Afk sistemine giriş yaptınız, her el başı slaylanacak ve artık mesaj atamayacaksınız.", 0.45, 0.05, 1.0, 1.0, 0, 0.1, 1.0); if(is_user_alive(id)){ set_task(5.0, "UserKill", id); } } return PLUGIN_HANDLED; } public client_disconnected(id){ g_blPlayerAFK[id] = false; } Przeczytaj cały wpis
  21. DescriptionOn map start it sets a mapcycle to a custom file "data/lastmaps.txt" without recently played maps & writes down excluded maps to the file "data/lastmaps_array.txt" to be loaded when the server restart. CVARsm_lastmaps Number of recent maps to exclude (7 default). Commandslastmaps Recently played maps that will be excluded from the map vote. Changelog20/06/2023 (1.5) Initial release. Attached Files Get Plugin or Get Source (lastmaps.sp - 8.3 KB) Wyświetl pełny artykuł
  22. Command listsm_devtag Toggle your dev tag (On by default) Changelog19/06/2023 (1.0) Initial release. Attached Thumbnails Attached Files Get Plugin or Get Source (devtag.sp - 2.6 KB) Wyświetl pełny artykuł
  23. I have one of the match/captain plugin where two captains are selected, they duel it out, select teams and then select players. But when the players selected from the spectator, some of them lose their crosshair and have to reconnect. Can anyone help me fix this please? Its a real nuisance to players. LetsSecondChoosePlayers() is similar to LetsFirstChoosePlayers() Code: // transferring all players to spectator public Spec() { new iPlayers[32], iPlayersNum, iPlayer get_players(iPlayers, iPlayersNum) for(new i;i < iPlayersNum;i++) { iPlayer = iPlayers[i] if(is_user_alive(iPlayer)) { user_silentkill(iPlayer) } if(cs_get_user_team(iPlayer) < CS_TEAM_SPECTATOR) { cs_set_user_team(iPlayer, CS_TEAM_SPECTATOR) } } } // MENU TO CHOOSE PLAYERS FOR FIRST CAPTAIN !!! public LetsFirstChoosePlayers(id){ new players[32], count; get_players(players, count,"eh","SPECTATOR"); if(count > 0){ new iChoosePlayers = LetsFirstChoosePlayersMenu( id, "Choose A player.", "LetsFirstChoosePlayersHandler" ); menu_setprop( iChoosePlayers, MPROP_NUMBER_COLOR, "\y" ); menu_display( id, iChoosePlayers ); return PLUGIN_HANDLED; } else{ set_cvar_string("amx_warname","Teams Are Set!") set_dhudmessage(0,255, 0, -1.0, -1.0, 0, 2.0, 6.0, 0.8, 0.8) show_dhudmessage(0,"Teams are SET ! ^n ^n First Half will start Now.......") // Set Tasks set_task(0.1,"SetMatchCap"); set_task(1.0,"LiveInThree"); set_task(1.2, "SV_Restart", .flags="a", .repeat=3); set_task(3.0,"StartMatch"); return PLUGIN_HANDLED; } } LetsFirstChoosePlayersMenu(id, const szMenuTitle[], const szMenuHandler[]){ new iChoosePlayers = menu_create( szMenuTitle, szMenuHandler ); new iPlayers[32], iNum, iPlayer, szPlayerName[32], szUserId[32]; get_players( iPlayers, iNum, "h" ); new PlayerWithPoints[128] for(new i = 0 ;i<iNum;i++){ iPlayer = iPlayers[i]; //Add user in the menu if - CONNECTED and TEAM IS T. if(get_user_team(iPlayer) == 3 ){ get_user_name( iPlayer, szPlayerName, charsmax( szPlayerName ) ); formatex(PlayerWithPoints,127,"%s",szPlayerName) formatex( szUserId, charsmax( szUserId ), "%d", get_user_userid( iPlayer ) ); menu_additem( iChoosePlayers, PlayerWithPoints, szUserId, 0 ); } } return iChoosePlayers; } public LetsFirstChoosePlayersHandler( id, iChoosePlayers, iItem ){ if ( iItem == MENU_EXIT ){ new iChoosePlayers = LetsFirstChoosePlayersMenu( id, "Choose A player.", "LetsFirstChoosePlayersHandler" ); menu_setprop( iChoosePlayers, MPROP_NUMBER_COLOR, "\y" ); menu_display( id, iChoosePlayers ); return PLUGIN_HANDLED; } new szUserId[32], szPlayerName[32], iPlayer, iCallback; menu_item_getinfo( iChoosePlayers, iItem, iCallback, szUserId, charsmax( szUserId ), szPlayerName, charsmax( szPlayerName ), iCallback ); if ( ( iPlayer = find_player( "k", str_to_num( szUserId ) ) ) ){ new ChoosenPlayer[32] get_user_name(iPlayer, ChoosenPlayer, charsmax(ChoosenPlayer)) CromChat(0," &x04Captain &x03%s &x04chose &x01Player &x04%s ",g_Captain1,ChoosenPlayer); if(!is_user_connected(iPlayer)){ new iChoosePlayers = LetsFirstChoosePlayersMenu( id, "Choose A player.", "LetsFirstChoosePlayersHandler" ); menu_setprop( iChoosePlayers, MPROP_NUMBER_COLOR, "\y" ); menu_display( id, iChoosePlayers ); return PLUGIN_HANDLED; } else{ CaptainChoosenID = id WhoChoseThePlayer = 1 cs_set_user_team(iPlayer, cs_get_user_team(id)) LetsSecondChoosePlayers(ShowMenuSecond) return PLUGIN_HANDLED; } } return PLUGIN_HANDLED; } Przeczytaj cały wpis
  24. I get the following errors with this mod: [AMXX] Displaying debug trace (plugin "rubakamod.amxx", version "1.0") [AMXX] Run time error 4: index out of bounds [AMXX] [0] lrubakamod.sma::postThink (line 1642) [AMXX] Displaying debug trace (plugin "rubakamod.amxx", version "1.0") [AMXX] Run time error 4: index out of bounds [AMXX] [0] lrubakamod.sma::preThink (line 1383) [AMXX] Displaying debug trace (plugin "rubakamod.amxx", version "1.0") [AMXX] Run time error 4: index out of bounds [AMXX] [0] lrubakamod.sma::show_colored_message (line 1099) [AMXX] [1] lrubakamod.sma::client_disconnected (line 1020) [AMXX] Displaying debug trace (plugin "rubakamod.amxx", version "1.0") [AMXX] Run time error 4: index out of bounds [AMXX] [0] lrubakamod.sma::client_disconnected (line 1033) Attachment 200960 Any ideas? This mod is super fun, but console gets flooded with these errors. Attached Files Get Plugin or Get Source (rubakamod.sma - 98.9 KB) Przeczytaj cały wpis
  25. [TF2] Arena Waiting For Players A extremely simple plugin for Team Fortress 2 that enables Waiting For Players in arena mode. Defines a single convar sm_arena_waitingforplayers_enabled that is used to enable or disable the plugin. 🡺 Source Code on GitHub Attached Files Get Plugin or Get Source (arenawfp.sp - 3.1 KB) arenawfp.txt (1.3 KB) Wyświetl pełny artykuł
×
×
  • Dodaj nową pozycję...