Resource icon

Script [VScript] MapPlugins v3.3.0

No permission to download
Introduce plugin style scripting to Source VScripts

Important Notices
1. v3.3.0 is the last August update and should be stable.
2. I've already included an example map bsp. So, you just need to follow the installation guide and simply load the map in the game. You should see that, you and the bots getting inflicted by random status effect every few seconds.

  • Introduce plugin style scripting to VScripts
  • Extends the functionality of VScripts.
  • Send server data from Sourcemod Plugin to VScript.

Archive Content
- MapPlugins scripts
- Sourcemod plugin + source
- Entity Prefab for script setup
- Example plugin
- Example status effect scripts
- Example map source

v3.2.0 (19/8/2019):
- Revised folder structures
- Revised script structures.
- Added gamemod portability support.
- Renamed example plugin script's folder name.
- Renamed demo plugin's file name.
v3.1.0 (18/8/2019):
- Renamed MapScripts to MapPlugins
- Changed license to GPLv3.
- Separated codes to suit the license.
- Revised folder structures
- Updated Player codes.
- Updated Schedule codes.
- Changed example to something simple, and smaller.
v3.0.0 (16/8/2019):
- Mature mapspawn stages
- Revised folder structures.
- Updated SM plugin function names.
- Added round_start, begin_newmatch, round_end, player_spawned, item_pickup, and item_remove events.
- Added player data extension stage to player_spawned event.
- Remade player util codes. Calling player execute functions now loop through all players including bot for performance efficiency
- Pseudo explicit cast util.
- Schedule util.
- Math.CompareVector function.
- Pseudo enum creation util.
- Pseudo weapon definition util for mapping hammer weapon entity classname to definition index.
- Updated entity prefabs.
- Example map with status effects and item drop detection (item detection drop will print null instance error if you pick up dual elite and then the knife. Weapon strip will remove elite weapon entity if you do so. Will try entity_killed event tomorrow for fix.
- Included map source.
- Included materials, models and particles.
- Optional - Look at maps/zero_demo_1_particles.txt for particle files you need to precache for viewing status particle effects.
v2.4.0 (5/8/2019):
- Added Random.Float, Random.FloatRange, Random.GeneratePointWithinRectangle, Random.GeneratePointWithinSquare and Random.GeneratePointWithinCircle. (mapscripts/framework/util/random.nut)
- Added Point class for random util usage. (mapscripts/framework/classes/point.nut)
- Fixed shufflebag bug where the new shufflebag instance use the same array.
v2.3.1 (4/8/2019):
- Updated Math.WithinAngle with simpler calculations. Faster than the old version.
v2.3.0 (3/8/2019):
- Updated Math.WithinAngle. It's now 100% accurate.
- More entity utils.
- Ported damage utils from raid scripts.
- Added random, hudhint and prop utils.
- Added shufflebag class defnition.
v2.2.1 (1/8/2019):
- Fixed EntCreateClassname and EntFindClassname bugs.
v2.2.0 (1/8/2019):
- Added more entity utility functions.
- Added more math utility functions.
- Renamed function Math.InsideRadius to Math.WithinRadius and function Math.InsideAngle to Math.WithinAngle
- Updated codes for Math.WithinAngle function.
v2.1.0 (31/7/2019):
- Renamed entity and player utility functions.
- Ported some of Raid Scripts utiliies. Math, Animation and Thruster.
- Rearranged mapscripts include to support new functions.
- Added Map.ReloadScripts and Map.Restart functions
- Now the script will register it's entity as proxy.
v2.0.2 (30/7/2019):
- Revised license conditions.
- Updated sourcemod plugin to v1.1.
v2.0.1 (29/7/2019):
- Fixed an error where sourcemod couldn't call vscript player disconnect function.
v2.0 (29/7/2019):
- Added license information.
- Included example script info and map configuration files.
- Revised script info configuration design.
- Added kill player and kill team utility.
- Updated player info functions.
- Added sm.nut to streamline SM to VS function call method.
- Updated sourcemod plugin for calling vscript player_connect and player_disconnect events.
- VScript now capture player_connect and player_disconnect events through sourcemod plugin.
v1.0.1 (28/7/2019):
- Include entity prefab
v1.0 (28/7/2019):
- Initial Release

Github Repository

VScript MapPlugins is licensed under the GNU General Public License version 3. Special exceptions are outlined in <>.

1. Extract archive contents to a folder.
2. Place "bin", "csgo" and "prefabs" folders inside "/steamapps/common/Counter-Strike Global Offensive/" or "/csgo-ds/". SM plugin has already included and will be enabled if you have SourceMod installed.

Running a test
1. Launch Valve Hammer Editor.
2. Open "mapplugins_example.vmf" inside SDK Map Directory - "/sdk_content/maps/ "
3. Compile it, run the map and join a team.
4. You should see that you and the bots getting inflicted by random status effect every few seconds.

How to use MapPlugins in your Map
1. Create and place entity prefab "mapplugins.vmf" that is located inside "/bin/prefabs/ directory", somewhere inside your map.
2. Compile it.
3. Open MapPlugins Maps directory - "/scripts/vscripts/mapplugins/maps /"
4. Create a text file, put your map's name as the file name and make sure the file extension is .nut. It should looks like this "your_map_name.nut" instead of "your_map_name.txt".
5. Open the file in your notepad editor.
6. Copy and paste the codes below inside your file.
Please, Log in or Register to view codes content!
7. Save it, launch the game and load your map.
8. You should see at least yourself getting inflicted by random status effect every few seconds.
9. To stop the example plugin from being loaded in your map, remove "example_plug" from your file. It should looks like the codes below.
Please, Log in or Register to view codes content!
10. Reload your map and done.
11. To load multiple plugins in your map, you only need to add one line that contains the plugin's file name for each plugin. You can find the plugin's file name inside "/mapplugins/plugins/".
Please, Log in or Register to view codes content!

Instructions For Making A Plugin
1. Take a look at "/mapplugins/plugins/example_plugin.nut" for example.

Console Commands

script Map.Restart()

Reload the map.

Callback Functions

void OnMapStart()
void OnPreRoundStart()
void OnWarmupPeriod()
void OnNewMatch()
void OnRoundStart()
void OnRoundEnd()
void EventPlayerInfo(event_data)
void EventPlayerSay(event_data)
void EventItemPickup(event_data)
void EventItemRemove(event_data)
void EventWeaponStrip(event_data)
  • Like
Reactions: Azure and SHUFEN
First release
Last update
0.00 star(s) 0 ratings

Latest updates

  1. v3.3.0 Update

    Changelog - Wrapped most of the script libraries inside dedicated "VS" namespace. - Merged cast...
  2. v3.2.0 Update

    Changelog - Revised folder structures - Revised script structures. - Added gamemod portability...
  3. Updated to v3.1.0

    MapScripts are now known as MapPlugins. Changelog - Changed license to GPLv3. - Separated codes...