Raised This Month: $51 Target: $400
 12% 

[CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (v1.5 | May 17, 2023)


Post New Thread Reply   
 
Thread Tools Display Modes
AcridGamer
Junior Member
Join Date: Jul 2018
Location: Romania
Old 04-02-2023 , 21:43   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #11

Great but i have a little problem, MVP Plugin play same time with my Music KIt, music kits are not stoping... Any ideea?
__________________
AcridGamer is offline
born for gaming
Member
Join Date: Aug 2019
Location: Pakistan
Old 04-05-2023 , 04:43   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #12

Quote:
Originally Posted by AcridGamer View Post
Great but i have a little problem, MVP Plugin play same time with my Music KIt, music kits are not stoping... Any ideea?
Don't Know, it's working fine for me
__________________
Accepting Paid Request

My Plugins: VIP, MVP Anthem, Valorant Killstreak, Whois, Noscope
Contact Me: Discord : Slayer47#7002 | Steam : zakriamansoor47
born for gaming is offline
AcridGamer
Junior Member
Join Date: Jul 2018
Location: Romania
Old 04-05-2023 , 16:32   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #13

Quote:
Originally Posted by born for gaming View Post
Don't Know, it's working fine for me
everything works fine but the music kits are playing same time with the mvp.. and its a mes..
__________________
AcridGamer is offline
rogeraabbccdd
Veteran Member
Join Date: Jun 2015
Location: de_dust2
Old 04-06-2023 , 08:44   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #14

Quote:
Originally Posted by AcridGamer View Post
Great but i have a little problem, MVP Plugin play same time with my Music KIt, music kits are not stoping... Any ideea?
Add this in OnPluginStart should fix the problem.
PHP Code:
SetCommandFlags("playgamesound"GetCommandFlags("playgamesound") ^ FCVAR_CHEAT); 
__________________

Please keep in mind, nobody have responsibility to help you, especially who don't try to Google first.
I only read messages in Chinese and English.

GitHub | Discord:Kento#2118

Last edited by rogeraabbccdd; 04-06-2023 at 08:44.
rogeraabbccdd is offline
AcridGamer
Junior Member
Join Date: Jul 2018
Location: Romania
Old 04-06-2023 , 13:34   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #15

Quote:
Originally Posted by rogeraabbccdd View Post
Add this in OnPluginStart should fix the problem.
PHP Code:
SetCommandFlags("playgamesound"GetCommandFlags("playgamesound") ^ FCVAR_CHEAT); 
PHP Code:
#include <sourcemod>
#include <clientprefs>
#include <sdktools>
#include <sdkhooks>
#include <adminmenu>
#include <multicolors>

#pragma semicolon 1

#define MAX_FILE_LEN 1024 // Maximum Lenght of file path
#define MAX_MVP_COUNT 1000 // Maximum Numbers of Mvps

// ConVars
ConVar sEnable;
ConVar sVolume;
ConVar sMessage;
ConVar sPreview;
ConVar sPreviewTime;
ConVar sBotMvp;
ConVar sAllowBot;
ConVar sShowPremium;
ConVar sShowFound;
ConVar sAlreadyUsedMVPs;

// Ints
int MVPCountSelected[MAXPLAYERS+1], MenuSelect[MAXPLAYERS+1];
int AlreadyUsed 1;

// Bools
bool IsPremiumMVP[MAX_MVP_COUNT 1];

// Chars
char ConfigfilePath[1024], 
    
MVPName[MAX_MVP_COUNT 1][1024], 
    
MVPFile[MAX_MVP_COUNT 1][1024],
    
MVPAlreadyUsed[101][1024],
    
MVPFlag[MAX_MVP_COUNT 1][AdminFlags_TOTAL],
    
MVPLink[MAX_MVP_COUNT 1][1024],
    
NameMVP[MAXPLAYERS 1][1024];

// Arrays
ArrayList MVPSteamID[MAX_MVP_COUNT+1];

// Floats
float VolMVP[MAXPLAYERS 1];
float mvp_defaultVol;

// Handles
Handle mvp_cookiemvp_cookie2;
Handle MvpPreviewTimer[MAXPLAYERS+1];

public 
Plugin myinfo =
{
    
name "[CSGO] Custom MVP Anthem",
    
author "SLAYER",
    
version "1.3",
    
description "Allow player to set Custom MVP Anthem",
    
url "https://forums.alliedmods.net/member.php?u=293943"
};

public 
void OnPluginStart()
{
    
// Cookies
    
mvp_cookie RegClientCookie("mvp_name""Player's MVP Anthem"CookieAccess_Private);
    
mvp_cookie2 RegClientCookie("mvp_vol""Player MVP volume"CookieAccess_Private);
    
    
// Convars
    
sEnable CreateConVar("mvp_enabled""1""Enable/Disable SLAYER MVP plugin. (0 = Disabled, 1 = Enabled)"FCVAR_NOTIFYtrue0.0true1.0);
    
sVolume CreateConVar("mvp_defaultvol""1.0""Default MVP anthem volume."FCVAR_NOTIFYtrue0.0true1.0);
    
sMessage CreateConVar("mvp_announce_type""3""Announcement of playing MVP Anthem in (1 = Chat, 2 = Hint, 3 = Both)"FCVAR_NOTIFY);
    
sPreview CreateConVar("mvp_preview""1""Allow player to Preview MVP? (0 = No, 1 = Yes)"FCVAR_NOTIFYtrue0.0true1.0);
    
sPreviewTime CreateConVar("mvp_preview_time""10.0""MVP Anthem Preview Time in Seconds"FCVAR_NOTIFYtrue1.0);
    
sBotMvp CreateConVar("mvp_bot""1""Play Random MVP Anthem if bot becomes MVP? (0 = No, 1 = Yes)"FCVAR_NOTIFYtrue0.0true1.0);
    
sAllowBot CreateConVar("mvp_bot_allow""1""Allow Bots to use Premium MVPs? (0 = No, 1 = Yes)"FCVAR_NOTIFYtrue0.0true1.0);
    
sShowPremium CreateConVar("mvp_show_premium""1""Show Premium MVPs (as Disabled) to which Client don't have Access? (0 = No, 1 = Yes)"FCVAR_NOTIFYtrue0.0true1.0);
    
sShowFound CreateConVar("mvp_show_found""1""Show MVPs name in server console which are founded in given directory by using 'sm_mvp_load' cmd? (0 = No, 1 = Yes)"FCVAR_NOTIFYtrue0.0true1.0);
    
sAlreadyUsedMVPs =  CreateConVar("mvp_already_played""5""How many recent Random MVPs can't play which are already played? (0 = Play any Random Mvp)"FCVAR_NOTIFYtrue0.0true100.0);
    
sVolume.AddChangeHook(OnConVarChanged);
    
    
// Events
    
HookEvent("round_mvp"Event_RoundMVP);
    
    
// Cmds
    
RegConsoleCmd("sm_mvp"Command_MVP"Select Your MVP Anthem");
    
RegConsoleCmd("sm_mvpvol"Command_MVPVol"MVP Volume");
    
RegAdminCmd("sm_mvp_refresh"CommandRefreshADMFLAG_RCON);
    
RegAdminCmd("sm_mvp_load"CommandLoadADMFLAG_RCON);
    
    
// Translation
    
LoadTranslations("SLAYER_Mvp.phrases");
    
    
// Config
    
AutoExecConfig(true"SLAYER_Mvp");
    
    for(
int i 1<= MaxClientsi++)
    { 
        if(
IsValidClient(i) && !IsFakeClient(i) && !AreClientCookiesCached(i))    OnClientCookiesCached(i);
    }
}
public 
void OnConfigsExecuted()
{
    
mvp_defaultVol sVolume.FloatValue;

    
LoadConfig();
}

public 
void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue)
{
    if (
convar == sVolume)    mvp_defaultVol sVolume.FloatValue;
    if(
convar == sEnable) {if(convar.BoolValue){sEnable.BoolValue true;CPrintToChatAll("SLAYER MVP Plugin is now Enabled!");}else{sEnable.BoolValue false;CPrintToChatAll("Kento MVP Plugin is now Disabled!");}}
}

public 
void OnClientPutInServer(int client)
{
    if (
IsValidClient(client))
    {
        if(!
IsFakeClient(client))OnClientCookiesCached(client);
    }
}

public 
void OnClientCookiesCached(int client)
{
    if(!
IsValidClient(client) && IsFakeClient(client))    return;
    
char random_mvp[1024];
    
Format(random_mvpsizeof(random_mvp), "%t""Random MVP");
    
char scookie[1024];
    
GetClientCookie(clientmvp_cookiescookiesizeof(scookie));
    if(!
StrEqual(scookie""))
    {
        if(
StrEqual(scookierandom_mvp))strcopy(NameMVP[client], sizeof(NameMVP[]), random_mvp);
        else
        {
            
int id FindMVPIDByName(scookie);
        
            if(
id 0)
            {
                
Selected[client] = id;
                
strcopy(NameMVP[client], sizeof(NameMVP[]), scookie);
            }
            else 
            {
                
Format(NameMVP[client], sizeof(NameMVP[]), "");
                
SetClientCookie(clientmvp_cookie"");
            }
        }
    }
    else if(
StrEqual(scookie,""))
    {
        
Selected[client] = -1;
        
strcopy(NameMVP[client], sizeof(NameMVP[]), random_mvp);
    }
        
    
GetClientCookie(clientmvp_cookie2scookiesizeof(scookie));
    if(!
StrEqual(scookie""))
    {
        
VolMVP[client] = StringToFloat(scookie);
    }
    else if(
StrEqual(scookie,""))VolMVP[client] = mvp_defaultVol;
}
public 
Action Event_RoundMVP(Handle event, const char[] namebool dontBroadcast)
{
    if(
sEnable.BoolValue)
    {
        
int client GetClientOfUserId(GetEventInt(event"userid"));
        if(
IsValidClient(client))
        {
            
char random_mvp[1024];
            
Format(random_mvpsizeof(random_mvp), "%t""Random MVP");
            if(
IsFakeClient(client) && sBotMvp.BoolValue)strcopy(NameMVP[client], sizeof(NameMVP[]), random_mvp);
            
int mvp;
            if(
StrEqual(NameMVP[client], random_mvp) || Selected[client] == -1// If Random MVP is selected
            
{
                if(
sAlreadyUsedMVPs.IntValue && sAlreadyUsedMVPs.IntValue >= MVPCount)
                {
                    
LogError("Error: 'mvp_already_played %d' Convar can't be equal/greater than your Total MVPs (%d). Please decrease the value of 'mvp_already_played' from config file."sAlreadyUsedMVPs.IntValueMVPCount);
                    
PrintToServer("[SLAYER-MVP] Error: 'mvp_already_played %d' Convar can't be equal/greater than your Total MVPs (%d). Please decrease the value of 'mvp_already_played' from config file."sAlreadyUsedMVPs.IntValueMVPCount);
                    return;
                }
                do
                {
                    do 
                    {
                        
mvp GetRandomInt(1,MVPCount); // Select a Random MVP
                    
} while(!CheckIsMvpAlreadyUsed(mvp)); // if mvp is already used then select another random mvp again
                
} while(!CanUseMVP(clientmvp)); // If client don't have access to that random MVP then Select another random mvp again
                
                
if(sAlreadyUsedMVPs.IntValue && AlreadyUsed sAlreadyUsedMVPs.IntValue)AlreadyUsed 1// Reset the Counter
                
if(sAlreadyUsedMVPs.IntValue 0)
                {
                    
MVPAlreadyUsed[AlreadyUsed] = MVPName[mvp]; // Save the name of the MVP in String Array
                    
AlreadyUsed++; // Increase the Counter
                
}
            }
            else {
mvp Selected[client];} // If Random MVP is not Selceted
            
            
if(StrEqual(NameMVP[client], "") || mvp == 0)return; // If MVP is not selected then return
            
char sound[1024];
            
Format(soundsizeof(sound), "%s"MVPFile[mvp]);
            for(
int i 1<= MaxClientsi++)
            {
                if (
IsValidClient(i) && !IsFakeClient(i)) // Play Sound to Every Vaild Player except BOT
                
{
                    
// Announce MVP
                    
if(sMessage.IntValue == || sMessage.IntValue == 3)PrintHintText(i"%t""MVP_Hint"clientMVPName[mvp]);
                    if(
sMessage.IntValue == || sMessage.IntValue == 3)CPrintToChat(i"%t %t""Tag","MVP_Chat"clientMVPName[mvp]);
                        
                    
// Mute game sound
                    
ClientCommand(i"playgamesound Music.StopAllMusic");
                    
//StopPlayingMVPs(i);
                    // Play MVP Anthem
                    
EmitSoundToClient(isoundSOUND_FROM_PLAYERSNDCHAN_STATICSNDLEVEL_NONE_VolMVP[i]);
                }    
            }
        }
    }
}

int FindMVPIDByName(char [] name)
{
    
int id 0;
    
    for(
int i 1<= MVPCounti++)
    {
        if(
StrEqual(MVPName[i], name))    id i;
    }
    
    return 
id;
}

public 
Action CommandRefresh(int clientint args)
{   
    
LoadConfig();
    
ReplyToCommand(client"[SLAYER MVP] MVP Sounds and Settings are Refreshed!");
    return 
Plugin_Handled;
}
public 
Action CommandLoad(int clientint args)
{
    
// If less than 2 arguments given then give error and return
    
if(args 1)
    {
        
ReplyToCommand(client"[SLAYER MVP] Usage: sm_mvp_load "mvps_folder_path" "number_of_mvps" "mvp_name_prefix" "preimum_mvp_flag"");
        return 
Plugin_Handled;
    }
    
    
// Get and Save Client Given Arguments
    
char FolderPath[PLATFORM_MAX_PATH];
    
char MvpsToLoad[4];
    
char MvpsPrefix[50];
    
char MvpsFlag[50];
    
GetCmdArg(1FolderPathsizeof(FolderPath));
    
GetCmdArg(2MvpsToLoadsizeof(MvpsToLoad));
    
GetCmdArg(3MvpsPrefixsizeof(MvpsPrefix));
    
GetCmdArg(4MvpsFlagsizeof(MvpsFlag));
    
    
// Checking if the given Path is Vaild or Not
    
if (!DirExists(FolderPath))
    {
        
// If path is INVALID then print error to client
        
ReplyToCommand(client"[SLAYER MVP] Given Path is INVAILD "%s"! Please Enter the VAILD Path"FolderPath);
        return 
Plugin_Handled;
    }
    
AddSoundsInConfig(FolderPathStringToInt(MvpsToLoad), MvpsPrefixMvpsFlag);
    return 
Plugin_Handled;
}
void LoadConfig()
{
    
// Config File Path
    
BuildPath(Path_SMConfigfilePathMAX_FILE_LEN"configs/SLAYER_Mvp.cfg");
    
// Check is Config File Exist or not
    
if(!FileExists(ConfigfilePath))
        
SetFailState("Can not find config file "%s"!"ConfigfilePath);
    
    
char SoundFilePath[PLATFORM_MAX_PATH];
    
    
KeyValues kv CreateKeyValues("MVP");
    
kv.ImportFromFile(ConfigfilePath);
    
    
MVPCount 1;
    
// Reseting Variables
    
for(int i 0MAX_MVP_COUNTi++)
    {
        
IsPremiumMVP[i] = false;
        
delete MVPSteamID[i];
        
MVPSteamID[i] = new ArrayList(ByteCountToCells(1024));
    }
    
// Reading Config File
    
if(kv.GotoFirstSubKey())
    {
        do
        {
            
// Getting and Saving the Information of MVP Sound 
            
kv.GetSectionName(MVPName[MVPCount], sizeof(MVPName[]));
            
kv.GetString("file"MVPFile[MVPCount], sizeof(MVPFile[]));
            
kv.GetString("flag"MVPFlag[MVPCount], sizeof(MVPFlag[]), "");
            
kv.GetString("link"MVPLink[MVPCount], sizeof(MVPLink[]), "");
            
// If MVP sound have any admin flag then it will be a Premium MVP
            
if(!StrEqual(MVPFlag[MVPCount], "") && !StrEqual(MVPFlag[MVPCount], " "))IsPremiumMVP[MVPCount] = true;
            
// Checking that the given sound file path shouldn't be empty.
            
if(StrEqual(MVPFile[MVPCount], "") && StrEqual(MVPFile[MVPCount], " "))
            {
                
LogError("Error: Given File Path of the Sound '%s' is Empty!"MVPName[MVPCount]);
                
PrintToServer("[SLAYER MVP] Error: Given File Path of the Sound '%s' is Empty!"MVPName[MVPCount]);
            }
            
// Checking that is the Given Sound File Path is Vaild or not. If not vaild then give error otherwise continue
            
Format(SoundFilePathsizeof(SoundFilePath), "%s%s""sound/"MVPFile[MVPCount]);
            if(!
FileExists(SoundFilePath))
            {
                
LogError("Failed to load %s from '%s'. Please Enter a Vaild Sound Path"MVPName[MVPCount], SoundFilePath);
                
PrintToServer("[SLAYER MVP] Failed to load %s from '%s'. Please Enter a Vaild Sound Path"MVPName[MVPCount], SoundFilePath);
            }
            if(
kv.JumpToKey("steamid"))
            {
                
char steamid[32][32];
                
int i 0;
                do
                {
                    
FormatEx(steamid[0], sizeof(steamid[]), "%i", ++i);
                    
kv.GetString(steamid[0], steamid[1], sizeof(steamid[]), "");
                    
MVPSteamID[MVPCount].PushString(steamid[1]);
                } while(
steamid[1][0]);
                
MVPSteamID[MVPCount].Erase(MVPSteamID[MVPCount].Length-1); // Remove the last entry since it should be empty due to the check above.
                
if(MVPSteamID[MVPCount].Length)IsPremiumMVP[MVPCount] = true;
                
kv.GoBack(); // We need to go back since we used KeyValue.JumpToKey()
            
}
            
// The Precaches all the sounds and adds them to the downloads table so that clients can automatically download them
            
char downloadFile[MAX_FILE_LEN];
            if(!
StrEqual(MVPFile[MVPCount], ""))
            {
                
PrecacheSound(MVPFile[MVPCount], true);
                
Format(downloadFileMAX_FILE_LEN"sound/%s"MVPFile[MVPCount]);
                
AddFileToDownloadsTable(downloadFile);
            }
            
MVPCount++;
            
        }
        while (
kv.GotoNextKey());
        
kv.Rewind();
        
delete kv;
    }
    if(
sAlreadyUsedMVPs.IntValue && sAlreadyUsedMVPs.IntValue >= MVPCount)
    {
        
LogError("Error: 'mvp_already_played %d' Convar can't be equal/greater than your Total MVPs (%d). Please decrease the value of 'mvp_already_played' from config file."sAlreadyUsedMVPs.IntValueMVPCount);
        
PrintToServer("[SLAYER-MVP] Error: 'mvp_already_played %d' Convar can't be equal/greater than your Total MVPs (%d). Please decrease the value of 'mvp_already_played' from config file."sAlreadyUsedMVPs.IntValueMVPCount);
    }
    
MVPCount--;
    
PrintToServer("[SLAYER MVP] Total '%i' MVP Sounds are now loaded!"MVPCount);
}
void AddSoundsInConfig(char[] SoundFolderPathint TotalSoundsToLoad=0char[] SoundsNamePrefix=""char[] PremiumSoundsFlag="")
{
    
int fileCounter 1;
    
char fileBuffer[512][PLATFORM_MAX_PATH];
    
char fileExtension[10];
    
    
// ------------------------------------------------------------------------------------------------------
    // Getting and Saving the names of the sound files in an array which are founded in the given directory
    // ------------------------------------------------------------------------------------------------------
    
PrintToServer("------------------------------------------------------------");
    
DirectoryListing dL OpenDirectory(SoundFolderPath);
    while (
dL.GetNext(fileBuffer[fileCounter], sizeof(fileBuffer))) 
    {
        
// Geting File Extension
        
GetFileExtension(fileBuffer[fileCounter], fileExtensionsizeof(fileExtension));
        
// File should have vaild name
        
if(StrEqual(fileBuffer[fileCounter], "."true) == true || StrEqual(fileBuffer[fileCounter], ".."true) == true)continue;
        
// Sound File should have 'mp3' or 'wav' extension otherwise will not be added
        
if(!StrEqual(fileExtension"mp3"false) && !StrEqual(fileExtension"wav"false))continue;
        
// Break the While loop if Sounds of a given amount are loaded
        
if(TotalSoundsToLoad && fileCounter >= TotalSoundsToLoad){fileCounter++;break;}
        else 
fileCounter++;
    }
    
fileCounter--;
    
    
    
// ---------------------------------------------------
    // Now Adding Founded Sound Files in MVP Config File
    // ---------------------------------------------------
    
    // Creating the Path of the Config file
    
BuildPath(Path_SMConfigfilePathMAX_FILE_LEN"configs/SLAYER_Mvp.cfg");
    
// If Config file not exists then give error
    
if(!FileExists(ConfigfilePath))
        
SetFailState("Can not find config file "%s"!"ConfigfilePath);
    
    
int AddedSounds 1;
    
int SoundCounter 1;
    
char SoundPath[PLATFORM_MAX_PATH];
    
char SoundName[PLATFORM_MAX_PATH];
    
KeyValues kv CreateKeyValues("MVP");
    
kv.ImportFromFile(ConfigfilePath);
    
kv.Rewind();
    
// Creating a While Loop
    
while(SoundCounter <= fileCounter)
    {
        
// 
        
if(StrEqual(fileBuffer[SoundCounter], ""false) || StrEqual(fileBuffer[SoundCounter], " "false))continue;
        
// Copying the Name of the Current Sound File
        
strcopy(SoundNamesizeof(SoundName), fileBuffer[SoundCounter]);
        
// Saving the Extension of the Current Sound File
        
GetFileExtension(SoundNamefileExtensionsizeof(fileExtension));
        
// Check if the Extension is "mp3" then replace the ".mp3" with "" to get Exact file name
        
if(StrEqual(fileExtension"mp3"false))ReplaceString(SoundNamesizeof(SoundName), ".mp3"""false);
        
// Check if the Extension is "wav" then replace the ".wav" with "" to get Exact file name
        
if(StrEqual(fileExtension"wav"false))ReplaceString(SoundNamesizeof(SoundName), ".wav"""false);
        
// If any Prefix is given then add it at the start of the Sound Name
        
if(!StrEqual(SoundsNamePrefix""false) && !StrEqual(SoundsNamePrefix" "false))
            
Format(SoundNamesizeof(SoundName), "%s %s"SoundsNamePrefixSoundName);
        
// Check if the given folder path ends with '/' or not. if not then add '/' on the end of the given path and then also add song name.
        
if(CheckPathEndsWithSlash(SoundFolderPath))Format(SoundPathsizeof(SoundPath), "%s%s"SoundFolderPathfileBuffer[SoundCounter]);
        if(!
CheckPathEndsWithSlash(SoundFolderPath))Format(SoundPathsizeof(SoundPath), "%s/%s"SoundFolderPathfileBuffer[SoundCounter]);
        
// Now remove the 'sound/' from the start of the path
        
ReplaceString(SoundPathsizeof(SoundPath), "sound/"""false);
        
// Now Check, is this Sound already exists in the Config file or not.
        
if(!IsSoundExistInCfgFile(ConfigfilePathSoundPath))
        {
            
kv.Rewind();
            
// If the Sound Name doen't exists then add the new key value
            
if(kv.JumpToKey(SoundNametrue))
            {
                
// Set the path of the Sound file to newly created key value
                
kv.SetString("file"SoundPath);
                
// if any admin flag is given then also add flag it in key value
                
if(!StrEqual(PremiumSoundsFlag""false) && !StrEqual(PremiumSoundsFlag" "false))
                    
kv.SetString("flag"PremiumSoundsFlag);
            }
            if(
sShowFound.BoolValue)PrintToServer("[SLAYER MVP] %d. MVP Added: %s"SoundCounterfileBuffer[SoundCounter]);
            
AddedSounds++;
        }
        else
        {
            if(
sShowFound.BoolValue)PrintToServer("[SLAYER MVP] %d. MVP already Exists: %s"SoundCounterfileBuffer[SoundCounter]);
        }
        
kv.Rewind();
        
SoundCounter++;
    }
    
kv.Rewind();
    
kv.ExportToFile(ConfigfilePath);
    
delete kv;
    
AddedSounds--;SoundCounter--;
    
PrintToServer("------------------------------------------------------------");
    
PrintToServer("[SLAYER MVP] '%d' MVPs Found in the given Directory"fileCounter);
    
PrintToServer("[SLAYER MVP] '%d' MVPs are now added in the Config file"AddedSounds);
    
PrintToServer("[SLAYER MVP] '%d' MVPs already exist in the Config file"fileCounter-AddedSounds);
    
LoadConfig();
    
PrintToServer("------------------------------------------------------------");
}
public 
Action Command_MVP(int client,int args)
{
    if(
sEnable.BoolValue)
    {
            
        if (
IsValidClient(client) && !IsFakeClient(client))
        {
            
ShowMainMenu(client);
        }
    }
    else
    {
        
CPrintToChat(client"%t %t","Tag""Disabled");
    }
    return 
Plugin_Handled;
}

void ShowMainMenu(int client)
{
    
    
Menu settings_menu = new Menu(SettingsMenuHandler);
    
    
char name[200];
    if(
StrEqual(NameMVP[client], ""))    Format(namesizeof(name), "%T""No MVP"client);
    else 
Format(namesizeof(name), NameMVP[client]);
    
    
char menutitle[200];
    
Format(menutitlesizeof(menutitle), "%T""Setting Menu Title"clientnameVolMVP[client]);
    
settings_menu.SetTitle(menutitle);
    
    
char mvpmenu[200], volmenu[200];
    
Format(mvpmenusizeof(mvpmenu), "%T""MVP Menu Title"client);
    
Format(volmenusizeof(volmenu), "%T""Vol Menu Title"client);
    
    
settings_menu.AddItem("mvp"mvpmenu);
    
settings_menu.AddItem("vol"volmenu);
    
    
settings_menu.Display(client0);
}

public 
int SettingsMenuHandler(Menu menuMenuAction actionint clientint param)
{
    if(
action == MenuAction_Select)
    {
        
char select[1024];
        
GetMenuItem(menuparamselectsizeof(select));
        
        if(
StrEqual(select"mvp"))
        {
            
DisplayMVPMenu(client0);
        }
        else if(
StrEqual(select"vol"))
        {
            
DisplayVolMenu(client);
        }
    }
}

void DisplayMVPMenu(int clientint start)
{
    if (
IsValidClient(client) && !IsFakeClient(client))
    {
        
Menu mvp_menu = new Menu(MVPMenuHandler);
        
        
char name[1024];
        if(
StrEqual(NameMVP[client], ""))    Format(namesizeof(name), "%T""No MVP"client);
        else 
Format(namesizeof(name), NameMVP[client]);
        
        
char mvpmenutitle[1024];
        
Format(mvpmenutitlesizeof(mvpmenutitle), "%T""MVP Menu Title 2"clientname);
        
mvp_menu.SetTitle(mvpmenutitle);
        
        
char nomvp[200];
        
Format(nomvpsizeof(nomvp), "%T""No MVP"client);
        
char random_mvp[200];
        
Format(random_mvpsizeof(random_mvp), "%t""Random MVP");
        
char premium_mvp[200];
        
Format(premium_mvpsizeof(premium_mvp), ">> %t""Premium MVP");
        
char player_mvp[200];
        
Format(player_mvpsizeof(player_mvp), ">> %t""Player MVP");
        
mvp_menu.AddItem(""nomvp);
        
mvp_menu.AddItem(premium_mvppremium_mvp);
        
mvp_menu.AddItem(player_mvpplayer_mvp);
        
mvp_menu.AddItem(random_mvprandom_mvp);
        
        for(
int i 1<= MVPCounti++)
        {
            if(
StrEqual(MVPFlag[i], "") || StrEqual(MVPFlag[i], " ")) // Add Only Those MVPs which don't have any admin flag and steamid
            
{
                if(!
MVPSteamID[i].Length)mvp_menu.AddItem(MVPName[i], MVPName[i]);
            }
        }
        
        
mvp_menu.ExitBackButton true;
        
mvp_menu.DisplayAt(clientstart0);
    }
}

public 
int MVPMenuHandler(Menu menuMenuAction actionint client,int param)
{
    if(
action == MenuAction_Select)
    {
        
char mvp_name[1024];
        
GetMenuItem(menuparammvp_namesizeof(mvp_name));
        
        
char random_mvp[200];
        
Format(random_mvpsizeof(random_mvp), "%t""Random MVP");
        
char premium_mvp[200];
        
Format(premium_mvpsizeof(premium_mvp), ">> %t""Premium MVP");
        
char player_mvp[200];
        
Format(player_mvpsizeof(player_mvp), ">> %t""Player MVP");
        if(
StrEqual(mvp_name""))
        {
            
CPrintToChat(client"%t %t""Tag","No Selected");
            
Selected[client] = 0;
            
NameMVP[client] = "";
            
SetClientCookie(clientmvp_cookie"");
            
DisplayMVPMenu(clientmenu.Selection);
        }
        else if(
StrEqual(mvp_namerandom_mvp)) // if Client Select Random Mvp Option
        
{
            
Selected[client] = -1;
            
CPrintToChat(client"%t %t""Tag","Selected"random_mvp);
            
strcopy(NameMVP[client], sizeof(NameMVP[]), random_mvp);
            
SetClientCookie(clientmvp_cookierandom_mvp);
            
DisplayMVPMenu(clientmenu.Selection);
        }
        else if(
StrEqual(mvp_namepremium_mvp)) // If Client Select Premium Mvp Option
        
{
            
DisplayPremiumMvpMenu(client0);
        }
        else if(
StrEqual(mvp_nameplayer_mvp)) // If Client Select other player MVP Option
        
{
            
DisplayClientMenu(client);
        }
        else
        {
            if(
sPreview.BoolValue)
            {
                
MenuSelect[client] = FindMVPIDByName(mvp_name);
                
PreviewMVP(client);
            }
            else
            {
                
int id FindMVPIDByName(mvp_name);
                if(
CanUseMVP(clientid))
                {
                    
CPrintToChat(client"%t %t""Tag""Selected"mvp_name);
                    
Selected[client] = id;
                    
strcopy(NameMVP[client], sizeof(NameMVP[]), mvp_name);
                    
SetClientCookie(clientmvp_cookiemvp_name);
                }
                else 
CPrintToChat(client"%t %t""Tag""No Flag"mvp_name);
            }
        }
        
    }
    else if (
action == MenuAction_Cancel && param == MenuCancel_ExitBack) {
    
ShowMainMenu(client);
  }
}
void DisplayClientMenu(int client)
{
    if (
IsValidClient(client) && !IsFakeClient(client))
    {
        
Menu player_menu = new Menu(PlayerMenuHandler);
        
char mvpmenutitle[200];
        
Format(mvpmenutitlesizeof(mvpmenutitle), "%t""Player MVP");
        
player_menu.SetTitle(mvpmenutitle);
        
AddTargetsToMenu2(player_menu0,COMMAND_FILTER_NO_BOTS);
        
player_menu.ExitBackButton true;
        
player_menu.DisplayAt(client00);
    }
}

public 
int PlayerMenuHandler(Menu menuMenuAction actionint client,int param)
{
    if(
action == MenuAction_Select)
    {
        
char steamid[50];
        
int target;
        
        
GetMenuItem(menuparamsteamidsizeof(steamid));
        
int userid StringToInt(steamid);
        if ((
target GetClientOfUserId(userid)) == 0)
        {
            
CPrintToChat(client"%t {white}Player no longer {darkred]Available","Tag");
        }
        else
        {
            
int id Selected[target];
            if(
CanUseMVP(clientid))
            {
                
CPrintToChat(client"%t %t""Tag""Selected"MVPName[id]);
                
Selected[client] = id;
                
strcopy(NameMVP[client], sizeof(NameMVP[]), MVPName[id]);
                
SetClientCookie(clientmvp_cookieMVPName[id]);
            }
            else 
            {
                
CPrintToChat(client"%t %t""Tag""No Flag"MVPName[id]);
            }
        }
        
DisplayMVPMenu(client0);
    }
    else if (
action == MenuAction_Cancel && param == MenuCancel_ExitBack)DisplayMVPMenu(client0);
}
void DisplayPremiumMvpMenu(int clientint start)
{
    if (
IsValidClient(client) && !IsFakeClient(client))
    {
        
Menu premium_mvp_menu = new Menu(PremiumMVPMenuHandler);
        
        
char name[200];
        if(
StrEqual(NameMVP[client], ""))    Format(namesizeof(name), "%t""No MVP");
        else 
Format(namesizeof(name), NameMVP[client]);
        
char mvpmenutitle[200];
        
Format(mvpmenutitlesizeof(mvpmenutitle), "%t""MVP Menu Title 2"name);
        
int count_mvp 0;
        for(
int i 1<= MVPCounti++)
        {
            if(
CanUsePremiumMVP(clienti)) // Show Only those Premium MVPs to which Client have Access by admin flags/steamid
            
{
                
premium_mvp_menu.AddItem(MVPName[i], MVPName[i]);
                
count_mvp++;
            }
            else
            {
                if(
sShowPremium.BoolValue && IsPremiumMVP[i])
                {
                    
premium_mvp_menu.AddItem(MVPName[i], MVPName[i], ITEMDRAW_DISABLED);
                    
count_mvp++;
                }
            }            
        }
        if(
count_mvp == 0// If Client don't have access to any premium MVPs
        
{
            
char no_mvp[100];
            
Format(no_mvpsizeof(no_mvp), "%t""No Premium MVP");
            
premium_mvp_menu.AddItem(no_mvpno_mvpITEMDRAW_DISABLED);
        }
        else 
premium_mvp_menu.SetTitle(mvpmenutitle);
        
premium_mvp_menu.ExitBackButton true;
        
premium_mvp_menu.DisplayAt(clientstart0);
    }
}
public 
int PremiumMVPMenuHandler(Menu menuMenuAction actionint client,int param)
{
    if(
action == MenuAction_Select)
    {
        
char mvp_name[1024];
        
GetMenuItem(menuparammvp_namesizeof(mvp_name));
        if(
sPreview.BoolValue)
        {
            
MenuSelect[client] = FindMVPIDByName(mvp_name);
            
PreviewMVP(client);
        }
        else
        {
            
int id FindMVPIDByName(mvp_name);
            if(
CanUseMVP(clientid))
            {
                
CPrintToChat(client"%t %t""Tag""Selected"mvp_name);
                
Selected[client] = id;
                
strcopy(NameMVP[client], sizeof(NameMVP[]), mvp_name);
                
SetClientCookie(clientmvp_cookiemvp_name);
            }
            else {
                
CPrintToChat(client"%t %t""Tag""No Flag"mvp_name);
            }
            }
    }
    else if (
action == MenuAction_Cancel && param == MenuCancel_ExitBack)DisplayMVPMenu(client0);
}
void PreviewMVP(int client)
{
    if (
IsValidClient(client) && !IsFakeClient(client))
    {
        
Menu preview_mvp_menu = new Menu(PreviewMVPMenuHandler);
        
char preview[50];
        
Format(previewsizeof(preview), "%t""Preview Menu");
        
char select[50];
        
Format(selectsizeof(select), "%t""Select Menu");
        
char link[50];
        
Format(linksizeof(link), "%t""Link Menu");
        
int id MenuSelect[client];
        
preview_mvp_menu.AddItem(selectselect);
        
preview_mvp_menu.AddItem(previewpreview);
        if(!
StrEqual(MVPLink[id], "") && !StrEqual(MVPLink[id], " "))preview_mvp_menu.AddItem(linklink);
        
preview_mvp_menu.ExitBackButton true;
        
preview_mvp_menu.DisplayAt(client00);
    }
}
public 
int PreviewMVPMenuHandler(Menu menuMenuAction actionint client,int param)
{
    if(
action == MenuAction_Select)
    {
        
char option[50];
        
GetMenuItem(menuparamoptionsizeof(option));
        
char preview[50];
        
Format(previewsizeof(preview), "%t""Preview Menu");
        
char select[50];
        
Format(selectsizeof(select), "%t""Select Menu");
        
char link[50];
        
Format(linksizeof(link), "%t""Link Menu");
        
int id MenuSelect[client];
        if(
StrEqual(optionselect))
        {
            if(
CanUseMVP(clientid)) // If client Selecte 'Selecte Mvp' Option
            
{
                
CPrintToChat(client"%t %t""Tag""Selected"MVPName[id]);
                
Selected[client] = id;
                
strcopy(NameMVP[client], sizeof(NameMVP[]), MVPName[id]);
                
SetClientCookie(clientmvp_cookieMVPName[id]);
            }
            else {
                
CPrintToChat(client"%t %t""Tag""No Flag"MVPName[id]);
            }
            
DisplayMVPMenu(client0);
        }
        else if(
StrEqual(optionpreview)) // if Client Select Preview Mvp Option
        
{
            
char sound[1024];
            
Format(soundsizeof(sound), "%s"MVPFile[id]);
            
// Stop MVPs from Playing if they are playing
            
StopPlayingMVPs(client);
            
// Play MVP Anthem
            
EmitSoundToClient(clientsoundSOUND_FROM_PLAYERSNDCHAN_STATICSNDLEVEL_NONE_VolMVP[client]);
            if(
MvpPreviewTimer[client] != null)delete MvpPreviewTimer[client]; // Check is there already Auto stop MVP timer is running if then delete it
            
MvpPreviewTimer[client] = CreateTimer(sPreviewTime.FloatValueMvpPreviewTimerHandleclientTIMER_FLAG_NO_MAPCHANGE);// Create Auto Stop MVP Anthem Timer
            
PreviewMVP(client);
        }
        else if(
StrEqual(optionlink)) // if Client Select Mvp Link Option
        
{
            
CPrintToChat(client"%t {default}Link: %s""Tag"MVPLink[id]);
            
PreviewMVP(client);
        }
    }
    else if (
action == MenuAction_Cancel && param == MenuCancel_ExitBack)DisplayMVPMenu(client0);
}
public 
Action MvpPreviewTimerHandle(Handle timerany client)
{
    if(
IsValidClient(client) && !IsFakeClient(client))
    {
        
char sound[1024];
        
Format(soundsizeof(sound), "%s"MVPFile[MenuSelect[client]]);
        
StopSound(clientSNDCHAN_STATICsound); // Mute sound
    
}
    
MvpPreviewTimer[client] = null;
}
// Stop All MVPs file which are playing
void StopPlayingMVPs(int client)
{
    if(
IsValidClient(client) && !IsFakeClient(client))
    {
        
char sound[1024];
        for(
int i 1<= MVPCounti++)
        {
            
Format(soundsizeof(sound), "%s"MVPFile[i]);
            
StopSound(clientSNDCHAN_STATICsound); // Mute sound
        
}
    }
}
void DisplayVolMenu(int client)
{
    if (
IsValidClient(client) && !IsFakeClient(client))
    {
        
Menu vol_menu = new Menu(VolMenuHandler);
        
        
char vol[1024];
        if(
VolMVP[client] > 0.00)    Format(volsizeof(vol), "%.2f"VolMVP[client]);
        else 
Format(volsizeof(vol), "%T""Mute"client);
        
        
char menutitle[1024];
        
Format(menutitlesizeof(menutitle), "%T""Vol Menu Title 2"clientvol);
        
vol_menu.SetTitle(menutitle);
        
        
char mute[1024];
        
Format(mutesizeof(mute), "%T""Mute"client);
        
        
vol_menu.AddItem("0"mute);
        
vol_menu.AddItem("0.1""10%");
        
vol_menu.AddItem("0.2""20%");
        
vol_menu.AddItem("0.4""40%");
        
vol_menu.AddItem("0.6""60%");
        
vol_menu.AddItem("0.8""80%");
        
vol_menu.AddItem("1.0""100%");
        
vol_menu.ExitBackButton true;
        
vol_menu.Display(client0);
    }
}

public 
int VolMenuHandler(Menu menuMenuAction actionint client,int param)
{
    if(
action == MenuAction_Select)
    {
        
char vol[1024];
        
GetMenuItem(menuparamvolsizeof(vol));
        
        
VolMVP[client] = StringToFloat(vol);
        
CPrintToChat(client"%t %t""Tag""Volume 2"VolMVP[client]);
        
        
SetClientCookie(clientmvp_cookie2vol);

        
DisplayVolMenu(client);
    }
    else if (
action == MenuAction_Cancel && param == MenuCancel_ExitBack) {
    
ShowMainMenu(client);
  }
}

public 
Action Command_MVPVol(int client,int args)
{
    if(
sEnable.BoolValue)
    {
        if (
IsValidClient(client))
        {
            
char arg[20];
            
float volume;
            
            if (
args 1)
            {
                
CPrintToChat(client"%t %t""Tag""Volume 1"client);
                return 
Plugin_Handled;
            }
                
            
GetCmdArg(1argsizeof(arg));
            
volume StringToFloat(arg);
            
            if (
volume 0.0 || volume 1.0)
            {
                
CPrintToChat(client"%t %t""Tag""Volume 1"client);
                return 
Plugin_Handled;
            }
            
            
VolMVP[client] = StringToFloat(arg);
            
CPrintToChat(client"%t %t""Tag""Volume 2"VolMVP[client]);
            
            
SetClientCookie(clientmvp_cookie2arg);
        }
    }
    else
    {
        
CPrintToChat(client"%t %t","Tag""Disabled");
    }
    return 
Plugin_Handled;
}

stock bool IsValidClient(int client)
{
    if (
client <= 0) return false;
    if (
client MaxClients) return false;
    if (!
IsClientConnected(client)) return false;
    return 
IsClientInGame(client);
}

// Return True if MVP is not already Used
stock bool CheckIsMvpAlreadyUsed(int id)
{
    if(
sAlreadyUsedMVPs.IntValue 0)
    {
        for(
int i 1<= sAlreadyUsedMVPs.IntValuei++)
        {
            if(
StrEqual(MVPAlreadyUsed[i], MVPName[id]))return false;
        }
        return 
true;
    }
    else return 
true;
}

bool CanUseMVP(int clientint id)
{
    if(!
IsPremiumMVP[id])return true;
    else
    {
        if(
IsFakeClient(client) && !sAllowBot.BoolValue)return false;
        else if(
IsFakeClient(client) && sAllowBot.BoolValue)return true;
        if(
CanUsePremiumMVP(clientid))return true;
        else return 
false// If he has nothing he was a totally normal player then he can't use this mvp
    
}
}
stock bool CanUsePremiumMVP(int clientint id)
{
    if(!
IsPremiumMVP[id])return false;
    if(
ClientHaveSteamIDAccess(clientid))return true// Check is Client have MVP access by Steam ID
    
else if(!StrEqual(MVPFlag[id], "") && !StrEqual(MVPFlag[id], " ")) // If there not any admin flag restriction then check client have those flags or not
    
{
        if(
CheckCommandAccess(client"mvp"ReadFlagString(MVPFlag[id]), true))return true;
        else return 
false;
    }
    else return 
false;
}

stock bool ClientHaveSteamIDAccess(int clientint id)
{
    if(
MVPSteamID[id].Length// If the MVP has any steam id restrictions
    
{
        
char steamid[64];
        
GetClientAuthId(clientAuthId_Enginesteamidsizeof(steamid));
        if(!
IsFakeClient(client) && MVPSteamID[id].FindString(steamid) != -1)return true;
        else return 
false;
    }
    else return 
false// If the MVP has not any steam id restrictions then return
}

stock GetFileExtension(char[] file_namechar[] extensionint len)
{
    
int ijk;

    for (
strlen(file_name) - 1>= 0i--)
    {
        if (
file_name[i] == '.')
        {
            if (
== 0)
                
1;
            else
                break;
        }
    }

    
0;
    for (
jstrlen(file_name) && len 1i++)
    {
        
extension[k++] = file_name[i];
    }

    
extension[k] = '\0';
}
stock bool CheckPathEndsWithSlash(char[] str)
{
    
char[] slash "/";
    
int len strlen(str);
    if (
len == 0)
    {
        return 
false// Empty string
    
}
    else if (
StrEqual(str[len 1], slash))
    {
        return 
true// String ends with a slash
    
}
    else
    {
        return 
false// String does not end with a slash
    
}
}

stock bool IsSoundExistInCfgFile(char[] CfgFilePathchar[] SoundPath)
{
    if(!
FileExists(CfgFilePath))
    {
        
SetFailState("Can not find config file "%s"!"CfgFilePath);
        return 
false;
    }
    
char CfgSoundPath[100];
    
    
KeyValues kv CreateKeyValues("MVP");
    
kv.ImportFromFile(CfgFilePath);
    
    
// Now Reading Config File
    
if(kv.GotoFirstSubKey())
    {
        do
        {
            
kv.GetString("file"CfgSoundPathsizeof(CfgSoundPath));
            
// Check is Sound Exist by Path in CFG File
            
if(StrEqual(CfgSoundPathSoundPathfalse))
            {
                return 
true;
            }
        }
        while (
kv.GotoNextKey());
        
kv.Rewind();
        
delete kv;
    }
    return 
false;

can you please compile for me, i have a problem with my compiler, dont work, i try online and local, if you have a compiler.exe can u put it please with this one compiler, i give a vodka
__________________

Last edited by DarkDeviL; 04-30-2023 at 10:56. Reason: Adjusted QUOTE to CODE/PHP tags
AcridGamer is offline
ASTEK
New Member
Join Date: Jun 2022
Old 04-23-2023 , 12:16   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #16

Code:
L 04/23/2023 - 18:24:39: SourceMod error session started
L 04/23/2023 - 18:24:39: Info (map "$2000$") (file "/home/csgoserver/serverfiles/cstrike/addons/sourcemod/logs/errors_20230423.log")
L 04/23/2023 - 18:24:39: [SM] Exception reported: Script execution timed out
L 04/23/2023 - 18:24:39: [SM] Blaming: SLAYER_Mvp.smx
L 04/23/2023 - 18:24:39: [SM] Call stack trace:
L 04/23/2023 - 18:24:39: [SM]   [1] Line 968, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::CheckIsMvpAlreadyUsed
L 04/23/2023 - 18:24:39: [SM]   [2] Line 212, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_OnRoundEnd
L 04/23/2023 - 18:24:39: [SM]   [4] CS_TerminateRound
L 04/23/2023 - 18:24:39: [SM]   [5] Line 35, C:\Users\Tishin\Downloads\upload\forceendround.sp::wS_Timer_CallBack
L 04/23/2023 - 18:27:11: [SM] Exception reported: Script execution timed out
L 04/23/2023 - 18:27:11: [SM] Blaming: SLAYER_Mvp.smx
L 04/23/2023 - 18:27:11: [SM] Call stack trace:
L 04/23/2023 - 18:27:11: [SM]   [1] Line 212, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_OnRoundEnd
L 04/23/2023 - 18:27:11: [SM]   [3] AcceptEntityInput
L 04/23/2023 - 18:27:11: [SM]   [4] Line 650, C:\Users\dimse\Downloads\server test\sourcemod-1.10.0-git6545-windows\addons\sourcemod\scripting\homingmissiles.sp::CreateExplosion
L 04/23/2023 - 18:27:11: [SM]   [5] Line 619, C:\Users\dimse\Downloads\server test\sourcemod-1.10.0-git6545-windows\addons\sourcemod\scripting\homingmissiles.sp::OnStartTouchPost
L 04/23/2023 - 18:33:35: [SM] Exception reported: Script execution timed out
L 04/23/2023 - 18:33:35: [SM] Blaming: SLAYER_Mvp.smx
L 04/23/2023 - 18:33:35: [SM] Call stack trace:
L 04/23/2023 - 18:33:35: [SM]   [1] Line 968, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::CheckIsMvpAlreadyUsed
L 04/23/2023 - 18:33:35: [SM]   [2] Line 212, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_OnRoundEnd
L 04/23/2023 - 18:33:35: [SM]   [4] CS_TerminateRound
L 04/23/2023 - 18:33:35: [SM]   [5] Line 35, C:\Users\Tishin\Downloads\upload\forceendround.sp::wS_Timer_CallBack
L 04/23/2023 - 18:34:16: Error log file session closed.
L 04/23/2023 - 18:36:55: SourceMod error session started
L 04/23/2023 - 18:36:55: Info (map "de_dust2") (file "/home/csgoserver/serverfiles/cstrike/addons/sourcemod/logs/errors_20230423.log")
L 04/23/2023 - 18:36:55: [SM] Exception reported: Script execution timed out
L 04/23/2023 - 18:36:55: [SM] Blaming: SLAYER_Mvp.smx
L 04/23/2023 - 18:36:55: [SM] Call stack trace:
L 04/23/2023 - 18:36:55: [SM]   [1] Line 212, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_OnRoundEnd
L 04/23/2023 - 18:43:19: [SM] Exception reported: Script execution timed out
L 04/23/2023 - 18:43:19: [SM] Blaming: SLAYER_Mvp.smx
L 04/23/2023 - 18:43:19: [SM] Call stack trace:
L 04/23/2023 - 18:43:19: [SM]   [1] Line 968, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::CheckIsMvpAlreadyUsed
L 04/23/2023 - 18:43:19: [SM]   [2] Line 212, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_OnRoundEnd
L 04/23/2023 - 18:45:19: Error log file session closed.
L 04/23/2023 - 19:11:31: SourceMod error session started
L 04/23/2023 - 19:11:31: Info (map "dm_dun") (file "/home/csgoserver/serverfiles/cstrike/addons/sourcemod/logs/errors_20230423.log")
L 04/23/2023 - 19:11:31: [SM] Exception reported: Script execution timed out
L 04/23/2023 - 19:11:31: [SM] Blaming: SLAYER_Mvp.smx
L 04/23/2023 - 19:11:31: [SM] Call stack trace:
L 04/23/2023 - 19:11:31: [SM]   [1] Line 212, C:\Users\dimse\Downloads\sourcemod-1.11.0-git6932-windows\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_OnRoundEnd
L 04/23/2023 - 19:11:31: [SM]   [3] CS_TerminateRound
L 04/23/2023 - 19:11:31: [SM]   [4] Line 35, C:\Users\Tishin\Downloads\upload\forceendround.sp::wS_Timer_CallBack

This error causes the server to lose connection at the end of the round for a few seconds and then come back

Last edited by ASTEK; 04-23-2023 at 12:17.
ASTEK is offline
born for gaming
Member
Join Date: Aug 2019
Location: Pakistan
Old 05-04-2023 , 11:42   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #17

Code:
This error causes the server to lose connection at the end of the round for a few seconds and then come back
Did you edit the Plugin?
__________________
Accepting Paid Request

My Plugins: VIP, MVP Anthem, Valorant Killstreak, Whois, Noscope
Contact Me: Discord : Slayer47#7002 | Steam : zakriamansoor47
born for gaming is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 05-04-2023 , 17:49   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #18

Quote:
Originally Posted by ASTEK View Post
Spoiler

This error causes the server to lose connection at the end of the round for a few seconds and then come back
Log error is different from mine, but same error at the end, server loses connection for a few seconds and then comes back.

Apparently some compatibility problem with plugins, in my case Retake Insta Defuse.

Quote:
Originally Posted by paulo_crash View Post
I am getting the following server errors:
Code:
L 01/11/2023 - 19:25:51: [SM] Exception reported: Script execution timed out
L 01/11/2023 - 19:25:51: [SM] Blaming: SLAYER_Mvp.smx
L 01/11/2023 - 19:25:51: [SM] Call stack trace:
L 01/11/2023 - 19:25:51: [SM]   [1] Line 768, C:\Users\HTICS\Desktop\[CSGO] SLAYER MVP v1.2\[CSGO] SLAYER MVP v1.3\addons\sourcemod\scripting\SLAYER_Mvp.sp::CheckIsMvpAlreadyUsed
L 01/11/2023 - 19:25:51: [SM]   [2] Line 180, C:\Users\HTICS\Desktop\[CSGO] SLAYER MVP v1.2\[CSGO] SLAYER MVP v1.3\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_RoundMVP
L 01/11/2023 - 19:25:51: [SM]   [4] AcceptEntityInput
L 01/11/2023 - 19:25:51: [SM]   [5] Line 303, D:\Google Drive\ZK Servidores\Servidores CSGO\Editar Plugins\addons\sourcemod\scripting\retakes_instadefuse.sp::Frame_EndRound
L 01/11/2023 - 19:26:23: [SM] Exception reported: Script execution timed out
L 01/11/2023 - 19:26:23: [SM] Blaming: SLAYER_Mvp.smx
L 01/11/2023 - 19:26:23: [SM] Call stack trace:
L 01/11/2023 - 19:26:23: [SM]   [1] Line 180, C:\Users\HTICS\Desktop\[CSGO] SLAYER MVP v1.2\[CSGO] SLAYER MVP v1.3\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_RoundMVP
L 01/11/2023 - 19:26:23: [SM]   [3] AcceptEntityInput
L 01/11/2023 - 19:26:23: [SM]   [4] Line 303, D:\Google Drive\ZK Servidores\Servidores CSGO\Editar Plugins\addons\sourcemod\scripting\retakes_instadefuse.sp::Frame_EndRound
L 01/11/2023 - 19:26:59: [SM] Exception reported: Script execution timed out
L 01/11/2023 - 19:26:59: [SM] Blaming: SLAYER_Mvp.smx
L 01/11/2023 - 19:26:59: [SM] Call stack trace:
L 01/11/2023 - 19:26:59: [SM]   [1] Line 180, C:\Users\HTICS\Desktop\[CSGO] SLAYER MVP v1.2\[CSGO] SLAYER MVP v1.3\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_RoundMVP
L 01/11/2023 - 19:26:59: [SM]   [3] AcceptEntityInput
L 01/11/2023 - 19:26:59: [SM]   [4] Line 303, D:\Google Drive\ZK Servidores\Servidores CSGO\Editar Plugins\addons\sourcemod\scripting\retakes_instadefuse.sp::Frame_EndRound
L 01/11/2023 - 19:27:27: [SM] Exception reported: Script execution timed out
L 01/11/2023 - 19:27:27: [SM] Blaming: SLAYER_Mvp.smx
L 01/11/2023 - 19:27:27: [SM] Call stack trace:
L 01/11/2023 - 19:27:27: [SM]   [1] Line 180, C:\Users\HTICS\Desktop\[CSGO] SLAYER MVP v1.2\[CSGO] SLAYER MVP v1.3\addons\sourcemod\scripting\SLAYER_Mvp.sp::Event_RoundMVP
This error causes the server to lose connection at the end of the round for a few seconds and then come back. I believe that some error between it and the Retake Insta Defuse plugin.
paulo_crash is offline
born for gaming
Member
Join Date: Aug 2019
Location: Pakistan
Old 05-10-2023 , 02:21   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #19

Quote:
Originally Posted by ASTEK View Post
Spoiler
BTW, if you want to force round end when times up in $2000$ map. You can use my plugin which I use in CSS to force round end in $2000$ map with this MVP plugin and never had a problem. Try my Force round-end plugin and tell me if the issue still continues.

SLAYER Force Round End
__________________
Accepting Paid Request

My Plugins: VIP, MVP Anthem, Valorant Killstreak, Whois, Noscope
Contact Me: Discord : Slayer47#7002 | Steam : zakriamansoor47

Last edited by born for gaming; 05-10-2023 at 02:41.
born for gaming is offline
born for gaming
Member
Join Date: Aug 2019
Location: Pakistan
Old 05-18-2023 , 02:16   Re: [CSS/CSGO/ANY?] SLAYER Custom MVP Anthem (Kento_MVP)
Reply With Quote #20

New Update:

May 17, 2023 (v1.5):
  • Important Note: Before installing and loading this plugin (if you are updating) then please remove all the previous files or Replace all these files with them
  • New Category Added in MVP Main Menu called 'Choose MVP Playlist'.
  • Now Players can make MVP Playlists of their Favorite MVPs.
  • You can Allow/Disallow players to make MVP playlists from the CFG file.
  • You can also set how many MVP Playlists a player can make from the CFG file.
  • The Data of MVP Playlists will be saved in Sqlite Database.
  • Those MVPs will be removed from the Player's Playlist Database automatically if Server Owner removes those MVPs from the Config file. This means if MVP in the Player's Playlist is not found in the CFG file then that MVP will be automatically removed from the player's playlist database when the player joins the server or when the SLAYER_Mvp will be loaded/reload.
  • Now you can Allow/Disallow players to Choose the same MVP as another player had from the CFG file.
  • Updated the Format of MVP Main Menu. Now Normal/Common Mvps will be shown in their own category called 'Common MVPs'.
  • Fix some minor bugs.
__________________
Accepting Paid Request

My Plugins: VIP, MVP Anthem, Valorant Killstreak, Whois, Noscope
Contact Me: Discord : Slayer47#7002 | Steam : zakriamansoor47

Last edited by born for gaming; 05-18-2023 at 06:47.
born for gaming is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode