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:
example below:location model_short_name map(or all) defaultsequence#
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.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
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