Raised This Month: $19 Target: $400
 4% 

MVP Of the Round + Custom SoundTracks (reAPI Support)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 10-04-2020 , 05:27   MVP Of the Round + Custom SoundTracks (reAPI Support)
Reply With Quote #1

Most Valuable Player Of the Round


Informations
Description
This script can detect the best killer or the planter ( if the bomb exploded ) or the defuser ( if the planted bomb is defused ).
After the event is detected, it is showing a message in CHAT/ HUD / DHUD to all conected players.
Also, this script is supporting reHLDS's ReAPI, you can uncomment line 4
PHP Code:
#define USE_REAPI 
to use ReAPI instead of HamSandwich and some events.
Servers using this script: Click Here
Requirements
  • AmxModX 1.9.0+
  • Hamsandwich module
  • ReAPI Module ( reHLDS Needed )
Installation
  • Download the archive from down below.
  • Compile most_valuable_player.sma using a local compiler or a web compiler which supports custom includes.
  • Put most_valuable_player.amxx in amxmodx/plugins folder
  • Go to amxmodx/configs/plugins.ini, open the file and write on the last line most_valuable_player.amxx.
  • Restart your server or change the map.
API
What mean API ? API is an abbreviation from Application Programming Interface and it's used to make external scripts which are for compatibility purpose.
INC File:
PHP Code:
/* Sublime AMXX Editor v4.2 */

#if defined _most_valuable_player_included
    #endinput
#endif
#define _most_valuable_player_included

#pragma reqlib most_valuable_player
#if !defined AMXMODX_NOAUTOLOAD
    #pragma loadlib most_valuable_player
#endif

enum WinScenario
{
    
NO_SCENARIO = -1,
    
TERO_MVP 0,
    
CT_MVP,
    
KILLER_MVP_TERO,
    
KILLER_MVP_CT,
    
KILLER_MVP /* Just for default: case in PlayTrack(), unusable */
}

/**
 * @description            Multiforward called when a round end.
 *
 * @param scenario        Scenario index. See WinScenario enum
 * @return                Scenario index.
 */
forward mvp_scenario(WinScenario:scenario);

/**
 * Returns player's MVP kills.
 *
 * @param id        Player index.
 * @return            Amount of kills. -1 on error.
 */
native get_user_mvp_kills(id);

/**
 * Returns top killer's index.
 *
 * @param id        Top killer index.
 * @return            Top killer's index. -1 on error.
 */
native get_user_mvp_topkiller(id);

/**
 * Returns player's MVP damage.
 *
 * @param id        Player index.
 * @return            Player index. -1 on error.
 */
native get_user_mvp_damage(id);

/**
 * Returns player's MVP damage made with headshot.
 *
 * @param id        Player index.
 * @return            Player index. -1 on error.
 */
native get_user_mvp_hs_damage(id);

/**
 * Returns Player's MVPs.
 *
 * @param id        Player index.
 * @return            Player index. -1 on error.
 */
native get_user_mvps(id); 
Credits

OciXCrom for providing CromChat
Amxx-BG for providing API for ReAPI
Destro- for his Sublime AMXX-Editor
To Do List
  • Making a global variable to store players name. DONE
  • Add soundtracks which can be selected by every player, played when the player is MVP Of the Round. Proposed by @OciXCrom here. DONE
  • Add CS:GO like hud round end style. Proposed by DJEarthQuake here. DONE
Issues
  • No issues
ChangeLog

FULL Changelog can be found HERE
  • Version 1.0:
    • Initial Release
  • Version 1.3:
    • Added SoundTracks. Players can choose their own soundtrack.
    • Added SQL / nVault saving. This is used for remember each player's selected soundtrack.
    • Added HUD & DHUD message support.
    • Fixed a bug when no player were MVP, a empty message was shown.
  • Version 1.4:
    • Added SQLite Support.
  • Version 1.5:
    • Fixed a bug when no tracks were loaded from file.
    • Fixed a bug to tracklist handler.
    • Added Romanian Translation + a new entry in ML File.
  • Version 1.6:
    • Fixed multiple SQL connections.
    • Added Disable tracks option to saving / loading data.
    • Improved nVault save / load data.
  • Version 1.7:
    • Added the possibility to load / save data on Name or SteamID
    • Added the possibility to track player's MVPs.
    • Added a new native get_user_mvps() returning Player's MVPs.
    • Added a check for connected players.
    • Improved Load / Save checks against bots or hltv proxies.
    • Improved SQL Queries.
    • Less HardCoded SQL Queries.
    • Optimized Chat messages.
    • Fixed the Chat Prefix.
  • Version 1.8:
    • Added support for colored menus from Tracks Array
    • Cleaned and Improved pieces of code
Downloads
  • v. 1.0: 43 downloads
  • v. 1.3: 28 downloads
  • v. 1.4+: Moved on GitHub
GitHub Project

DOWNLOAD PLUGIN
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders

CSGO REMAKE ~ CSGO MOD [STABLE]

Last edited by Shadows Adi; 04-24-2021 at 06:51.
Shadows Adi is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-07-2020 , 03:45   Re: MVP Of the Round v1.0
Reply With Quote #2

Nice CS:GO port. It's remarkable. The parallel of style. Emp`s, 3D 'Vote Map' interactive map changer to Counter-Strike:Global Offensive Most Valuable Player. End game MVP token graphics. Food for thought.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-07-2020 , 06:37   Re: MVP Of the Round v1.0
Reply With Quote #3

It would be great if you also included music to go along with it, just like in CS:GO. Let the users choose their own soundtrack, probably leave an option to include custom soundtracks if porting them from CS:GO isn't allowed.
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 10-07-2020 , 09:19   Re: MVP Of the Round v1.0
Reply With Quote #4

Quote:
Originally Posted by DJEarthQuake View Post
Nice CS:GO port. It's remarkable. The parallel of style. Emp`s, 3D 'Vote Map' interactive map changer to Counter-Strike:Global Offensive Most Valuable Player.
Thanks.
Quote:
Originally Posted by DJEarthQuake View Post
End game MVP token graphics. Food for thought.
You want to refer to make it like a credits system, which will be used for @OciXCrom idea from down below?

Quote:
Originally Posted by OciXCrom View Post
It would be great if you also included music to go along with it, just like in CS:GO. Let the users choose their own soundtrack, probably leave an option to include custom soundtracks if porting them from CS:GO isn't allowed.
Maybe I will work to something like this. If it's requested I will do it until then it remains only in the planning phase.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders

CSGO REMAKE ~ CSGO MOD [STABLE]

Last edited by Shadows Adi; 10-07-2020 at 09:20.
Shadows Adi is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-07-2020 , 10:09   Re: MVP Of the Round v1.0
Reply With Quote #5

Copyrighted materials. Get written permission first. It is safer to let the users pick tunes. Credits to achieve what? Play the songs? That's a good one and funny too.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 10-07-2020 , 10:22   Re: MVP Of the Round v1.0
Reply With Quote #6

Quote:
Originally Posted by DJEarthQuake View Post
Copyrighted materials. Get written permission first. It is safer to let the users pick tunes. Credits to achieve what? Play the songs? That's a good one and funny too.
Yea, there are a lot of copyrighted materials, but @NoCopyrightSounds it's providing "free to use music to the content creator community". But I can make request a Commercial License Form for music acording to their Usage Policy and of course I will credit the artists and songs used.

Added on to To Do List
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders

CSGO REMAKE ~ CSGO MOD [STABLE]

Last edited by Shadows Adi; 10-07-2020 at 12:16.
Shadows Adi is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-08-2020 , 06:52   Re: MVP Of the Round v1.0
Reply With Quote #7

Music, I type mpg123 and a website CLI. As far as making the end game graphics to finish port matching it to CS:GO that was all I was referring to. DHUD would make a large badge to keep it low overhead and simple.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 10-08-2020 at 06:54. Reason: Posted in mid sentence!! WTF
DJEarthQuake is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 10-29-2020 , 18:52   Re: MVP Of the Round v1.0
Reply With Quote #8

I need a feedback from you guys:

I want to save player's data ( for soundtrack selection, to remember players selected soundtrack ).

What would be more comfortable? MySQL / Vault saving, or both of them?

I would go on vault 'cuz there are only the player's steamid and the soundtrack id.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders

CSGO REMAKE ~ CSGO MOD [STABLE]

Last edited by Shadows Adi; 10-29-2020 at 18:53.
Shadows Adi is offline
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 10-29-2020 , 20:56   Re: MVP Of the Round v1.0
Reply With Quote #9

Add support for deathmatch please.

prefer vault saving as well
__________________


Last edited by iclassdon; 10-29-2020 at 20:57.
iclassdon is offline
Send a message via MSN to iclassdon
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-29-2020 , 21:11   Re: MVP Of the Round v1.0
Reply With Quote #10

Quote:
Originally Posted by Shadows Adi View Post
I need a feedback from you guys:

I want to save player's data ( for soundtrack selection, to remember players selected soundtrack ).

What would be more comfortable? MySQL / Vault saving, or both of them?

I would go on vault 'cuz there are only the player's steamid and the soundtrack id.
Depends on what the user wants to be honest. I'd just make them both if you can, so that part's covered in the future aswell.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply


Thread Tools
Display Modes

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 16:10.


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