Mr_Swag Posted February 19, 2019 Share Posted February 19, 2019 Просмотр файла [CS:GO] Рандомное создавание предметов / Entity Spawner Плагин позволяет рандомно создавать вещи на карте (оружие,пропы и тд). Хорошо подойдет для Zombie или TTT сервера в CS:GO Для работы этого плагина потребуется основа: Команды: sm_esspawn - Создает предметы на карте sm_esclear - Удаляет все предметы на карте,которые были созданы этим плагиномsm_esreload - Перезагружает entities.cfg Настройки: entityspawner_nav_areas_required - сколько должно быть NavArea на карте, чтобы создавать предметы entityspawner_spawn_limit - лимит ентитей, после которого плагин прекращает создавать новые Видео: Пример конфига предметов для создания: ///////////////////////////////////////////////////////////////////////////////////////////////////////// // INFO // // The config is read from top to bottom, so maps put further up // the config will be prioritized // // Example: // - de_dust2 // - de_ // // If the map is dust2, the spawns for that section will be read. // If the map is nuke, the spawns for "de_" section will be read. // // MAP KEYS: // "spawnroundstart" "<number>" - 0 will disable entity spawning on round start // - 1 will enable entity spawning on round start // // "maxroundspawns" "<number>" - Amount of rounds entities will spawn // - 0 will spawn entities every round // // "spawninterval" "<number>" - Amount of seconds until entities should spawn again // - 0 will disable // // "resettimer" "<0/1>" - Should the spawn timer be reset on round start or transfer over rounds // // // ENTITY KEYS: // "classname" "<string>" - The classname of the entity you want to spawn // - List of CSGO specific entities can be found here: [url]https://developer.valvesoftware.com/wiki/List_of_Counter-Strike:_Global_Offensive_Entities[/url] // // "keyvalue<number>" "<key> <value>" - Enter a keyvalue for a entity, this is optional // - If you need to set multiple keyvalues, just increment the number after the key // Example: // - "keyvalue0" "model modelpath/modelname.mdl" // - "keyvalue1" "modelscale 5.0" // // "prop<number>" "<prop> <value>" - Enter a value for an entity property, this is optional // - If you need to set multiple props, just increment the number after the key // Example: // - "prop0" "m_iHealth 2" // - "prop1" "m_vecOrigin 50.0 24.5 36.0" // - "prop2" "m_iszName hehehehe" // // "maxspawns" "<number"> - Max amount of times this entity could be spawned per round. // However, it does not guarantee that it will spawn this amount of times. // // "zoffset" "<decimal>" - If the terrain is very uneven like dust2, increase this value a bit (5.0 - 10.0) // and you might see an increase of spawns. // - The reason for this key is because everytime a prop is spawned, it makes sure // that the prop fits around the area its spawned. // - Increasing this value will make the prop spawn higher above the ground // // "slopes" "<0/1>" - Can this entity spawn on slopes or only flat surfaces // //////////////////////////////////////////////////////////////////////////////////////////////////////////// // This stock config will spawn AWPS/Breakable crates/Chickens on maps that start with "de_" or "cs_" "entities" { "de_" { "spawnroundstart" "1" "maxroundspawns" "0" "spawninterval" "0" "resettimer" "1" "AWP" { "classname" "weapon_awp" "maxspawns" "20" "zoffset" "10.0" "slopes" "1" } "Breakable Crate" { "classname" "prop_physics_override" "keyvalue0" "model models/props_junk/wood_crate001a.mdl" "prop0" "m_takedamage 2" "maxspawns" "50" "zoffset" "10.0" "slopes" "1" } "Chicken Medium" { "classname" "chicken" "maxspawns" "20" "zoffset" "5.0" "slopes" "1" } } "cs_" { "spawnroundstart" "1" "maxroundspawns" "0" "spawninterval" "0" "resettimer" "1" "AWP" { "classname" "weapon_awp" "maxspawns" "20" "zoffset" "10.0" "slopes" "1" } "Breakable Crate" { "classname" "prop_physics_override" "keyvalue0" "model models/props_junk/wood_crate001a.mdl" "prop0" "m_takedamage 2" "maxspawns" "50" "zoffset" "10.0" "slopes" "1" } "Chicken Medium" { "classname" "chicken" "maxspawns" "20" "zoffset" "5.0" "slopes" "1" } } } Разработчикам: #if defined _entityspawner_included #endinput #endif #define _entityspawner_included #define ES_PREFIX " \x09[\x04ES\x09]" #define ES_MAX_ENTITIES 256 #define ES_INVALID_MAX_SPAWNS 0 #define ES_INVALID_SPAWN_INTERVAL 0 #define ES_INVALID_PROP_SEND_OFFSET -1 #define ES_INVALID_PROP_DATA_OFFSET -1 /** * Spawns random entities on the map (Set in entityspawner.cfg) * @return int amount of entities spawned */ native int ES_SpawnEntities(); /** * Clears all randomly spawned entities * @return int amount of entities removed */ native int ES_ClearEntities(); /** * Returns true if spawning is enabled on round start * @return bool are entities spawning on round start */ native bool ES_IsSpawningOnRoundStart(); /** * Returns true if theres enough nav areas (Set by convar) and if config is setup for current map * @return bool enough nav areas/config setup */ native bool ES_IsRandomSpawnsEnabled(); /** * Called when entities are randomly spawned across the map * @param entities that spawned (Entity references) * @param amount of entities spawned * @noreturn */ forward void ES_OnEntitiesSpawned(int entities[ES_MAX_ENTITIES], int entCount); /** * Called when all randomly spawned entities are removed * @param amount of entities removed * @noreturn */ forward void ES_OnEntitiesCleared(int entCount); public SharedPlugin __pl_entityspawner = { name = "entityspawner", file = "entityspawner.smx", #if defined REQUIRE_PLUGIN required = 1 #else required = 0 #endif }; #if !defined REQUIRE_PLUGIN public __pl_entityspawner_SetNTVOptional() { MarkNativeAsOptional("ES_SpawnEntities"); MarkNativeAsOptional("ES_ClearEntities"); MarkNativeAsOptional("ES_IsSpawningOnRoundStart"); MarkNativeAsOptional("ES_IsRandomSpawnsEnabled"); } #endif Добавил Mr_Swag Добавлено 19.02.2019 Категория CS:GO / CS2 Link to comment Share on other sites More sharing options...
Recommended Posts