Model/Sprite Spawner w/ Auto-Respawner

Post Reply
greenie
Full Member
Full Member
Posts: 1815
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Nu

Model/Sprite Spawner w/ Auto-Respawner

Post by greenie »

This plugin allows you to Precache, Spawn, and Remove Models / Sprites for each map. Example: You want to spawn a model on de_dust2 at your current location of a c4, a gign, a custom model, or even a sprite bilboard for your clan server. But what about on mapchange? Won't the models / sprites just dissapear? Nope, this plugin saves their location + view angle and spawns them back on map change. And if you only want to spawn a model on 1 map you don't have to have all of your clients download the model for any map but that 1 map.

Commands:
amx_spawn
Spawns a Model / Sprite <part of ent name> [Non-Default Sequence #]
amx_spawn_remove
Removes Model / Sprite you are standing next to.
amx_spawn_list
Lists Models / Sprites precached for this map.

How to work it:

The Command:
Just go to the location you want the model / sprite to appear at and type amx_spawn <part of name> [Non-Default sequence #]. The model / sprite will spawn at your location looking the way you are looking. If you happen to know a specific sequence you wish to play you can specify it here.

The .ini file:
The .ini file is made up of 4 parts all on the same line:
location model_short_name map(or all) defaultsequence#
example below:
models/player/gign/gign.mdl gign all 0
models/chicken.mdl chicken de_dust2 1
models/bigtree.mdl "Big Tree" all 0
sprites/wowzers.spr omfg aim_map 0
You can only have up to 200 precaches per map. Remember, the client has to download each model/sprite that you precache for that map.

Mapchange:
On mapchange the script will look up the map in it's database and find out if there were models / sprites spawned on that map, and if so then it will spawn them in their proper places w/ the proper view angles + sequence.

Removing Models / Sprites:
Just go up to / into the middle of the sprite / model and type the amx_spawn_remove command.

Note: The .ini file must be placed into your amxmodx/configs directory.
Note #2: A "GHW_entspawner_refferences.ini" file will be created by the script, do not delete or modify this file as it keeps track of where to spawn the ents.
Note #3: You can use a program like Half-Life model viewer to view model sequences. (Sequences start at 0 (usually idle) and go up by 1)
Note #4: Try not to go overboard on spawning. That will indeed crash your server.

plugin
source
Post Reply

Return to “General Purpose”