Raised This Month: $182 Target: $400
 45% 

Model Fun


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Plugin ID:
798
Plugin Version:
0.9
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    5 
    Plugin Description:
    Fun with spawning entites
    Old 03-06-2009 , 05:37   Model Fun
    Reply With Quote #1

    Model Fun - By Arg!

    Description:
    Spawn 'things' in game in various ways. Go spectator and drop models on people. Spawn any in game model, anywhere as physics prop or static prop. Attach models to players heads. Attach particles to players, if supported by the game engine. Full admin menu support in server commands and player commands menus. Ability to save a list of common models and particles for use in admin menus (some HL2 models are loaded on first plugin load). Particles lists are set per game.

    For TF2 Users:

    Since Valve removed support for parenting entities in TF2 recently (as of May 2010) this plugin now has support for the Metamod:Source and Sourcemod extension library 'Attachables' by voogru. Please see the thread http://forums.alliedmods.net/showthread.php?t=126577 for more information about how to install this library and regain TF2 support for this plugin.
    Note that you will not be able to see the model on yourself when using this method.

    Notes:
    • In some games, dropping models on people does no damage (eg TF2) whilst in others dropping stuff causes damage (eg CS:S).
    • Some models cannot be spawned as physics props and will not drop when spawned.
    • Use the console command - listmodels - to get all models loaded currently for the map.
    • You can still spawn any accesible model from hl2 or the game mod but there will be a small lagout while its cached.
    • Native functions are provided to allow other plugins to access the hat command, the idea behind it is u can create a plugin with custom hat models to handle the download table. If you are a plugin developer, check the include file for native function information.
    • Only ever spawn .mdl files.
    • You can only spawn 1 model at a time.
    • Hats work on players who are in spectator, which can be good fun, but be warned whilst being hatted and spectating. Hats will obstruct the players view if big enough.
    • If you add models directly to the file 'data/modelfun.txt', do sm_refreshmodels to get them into the admin menu.
    Commands:
    • sm_spawnphysics <modelpath> - spawn a model with physics properties.
    • sm_spawnmodel <modelpath> - spawn a static model (does not move)
    • sm_removemodel - removes last spawned model from the map.
    • sm_removemodels - removes all spawned models.
    • sm_hat <name or #userid> <modelname> - attaches a model to specified player(s) head.
    • sm_phat <name or #userid> <particlename> - attaches a model to specified player(s) head. ORANGE BOX OR GREATER ENGINE ONLY
    • sm_modellist - dump modelfun model list to console.
    • sm_particlelist - dump modelfun particle list to console.
    • sm_refreshmodels - reload modelfun model list from file 'data/modelfun.txt'
    • sm_refreshparticles - reload modelfun particle list from file 'data/modelfun.txt'
    • sm_addmodel <model name> <model file path> - Add a model to the modelfun model list (<model name> is a short name for the model which you choose)
    • sm_deletemodel - <model name> - Remove a model from the modelfun model list.
    Cvars:
    • sm_maxitemspawns - maximum allowed models on the map at the same time. Defaults to 10.
    Special Thanks to:
    • Spazman0 - This plugin is an extension of code written to attach hats to players heads which was 100% designed and written by Spazman0.
    Thanks to:Some Example Models:

    These models are available in all source games as they are in hl2 base, have a poke around in the hl2/models dir and your mod specific dir for more:
    • models/alyx.mdl - everyone loves alyx!
    • models/props_combine/combine_citadel001.mdl - This one spawns automatically adds itself to the skybox and its HUGE. Try spawning stuff in the skybox, makes it 16(?) times bigger.
    • models/dog.mdl - People who have not played hl2 will get confused at this.
    • models/gman.mdl - Suitcase man returns!
    • models/egypt/pillar/pillar_big.mdl (TF2 Only)- As of 20 March 2009 this model falls very slowly. For more fun spawn some in the skybox.
    Example Plugins:
    mf_rememberhats

    This plugin utilizes natives exposed in modelfun to save a hat to a player against their steam ID in a file. This means they will always have this hat when they join a server.

    Commands:
    • sm_permhat <name or #userid> <modelname> - sets a hat for player to recieve every time they join the server
    • sm_permhatoff <name or #userid> - removes persistent hat from player
    Changelog:

    10th September 2008 - 0.1
    • Initial Release
    • Compiled for Sourcemod 1.2.0
    17th March 2009 - 0.2
    • Added example plugin mf_rememberhats
    • Compiled with Sourcemod 1.2.0
    • All commands now check ROOT admin flag
    18th March 2009 - 0.3
    • Can now spawn mulitple entities
    • Added command sm_removemodels to remove all spawned entities
    • Added cvar sm_maxitemspawns to set maximum number of entities spawned
    27th June 2009 - 0.4
    • Compiled with Sourcemod 1.2.1
    • Added ability to read model info from 'data/modelfun.txt' kv file (defaults created on plugin load).
    • Added admin menu to spawn physics model (server commands).
    • Added admin menu to spawn static model (server commands).
    • Added admin menu to remove all models (server commands).
    • Added admin menu to hat player (player commands).
    • Added command 'sm_modellist' to dump loaded model list to console.
    • Added command 'sm_refreshmodels' to reload model list from KV file.
    • Added command 'sm_addmodel' to add model to modelfun model list.
    • Added command 'sm_deletemodel' to remove model from modelfun model list.
    4th August 2009 - 0.5
    • New command sm_phat <target> <particle_name> to attach particles to players (only supported in game which use info_particle_system, TF2 and L4d at time of writing)
    • Added player menu for sm_phat
    • Added list support for particles for TF2 and L4D
    • Added commands sm_particlelist and sm_refreshparticles to list and reload particle lists respectively
    • Fix for late loading admin menus
    • Remove all models (sm_removemodels) will now work correctly
    29th August 2009 - 0.6
    • CS:S Hats should now display at a better height
    • Included more complete list of TF2 Particles in release zipfile
    • Compiled with Sourcemod 1.2.2
    15th October 2009 - 0.7
    • Fix to allow sm_maxitemspawns to be changed on the the fly.
    22nd May 2010 - 0.8
    28th March 2011 - 0.9
    • Updated to most recent 'Attachables' include file.
    Attached Files
    File Type: zip modelfun_0.9.zip (57.1 KB, 2485 views)
    File Type: zip modelfun_0.8.zip (57.1 KB, 370 views)
    __________________

    Last edited by Arg!; 03-28-2011 at 02:46. Reason: 0.9 release
    Arg! is offline
    CrimsonGT
    Veteran Member
    Join Date: Oct 2007
    Location: Gainesville, FL
    Old 03-06-2009 , 07:37   Re: Model Fun
    Reply With Quote #2

    How do the hats work for you in TF2? When a few of us tried it out before the models appear in front of the players face in first person. I had to use a MMS plugin to work around that.
    __________________
    CrimsonGT is offline
    Arg!
    Veteran Member
    Join Date: Jul 2008
    Location: Australia
    Old 03-06-2009 , 08:05   Re: Model Fun
    Reply With Quote #3

    ah yes, i should have mentioned that. The hats do obstruct the players view if the the model is large enough to cover the players eye level.

    If you have a solution to this id be more than happy to implement it.
    __________________

    Last edited by Arg!; 03-06-2009 at 08:09.
    Arg! is offline
    Arg!
    Veteran Member
    Join Date: Jul 2008
    Location: Australia
    Old 03-07-2009 , 00:50   Re: Model Fun
    Reply With Quote #4

    i added some examples from hl2 base in the op
    __________________
    Arg! is offline
    Michael_a90
    Junior Member
    Join Date: Dec 2007
    Old 03-07-2009 , 12:28   Re: Model Fun
    Reply With Quote #5

    Does this only work if you have admin rights?
    Michael_a90 is offline
    Arg!
    Veteran Member
    Join Date: Jul 2008
    Location: Australia
    Old 03-08-2009 , 03:43   Re: Model Fun
    Reply With Quote #6

    Hat is on slay flag and spawnmodel commands are on root. They will all be on root for the next release.
    __________________
    Arg! is offline
    Inflikted
    SourceMod Donor
    Join Date: Jan 2009
    Old 03-08-2009 , 05:33   Re: Model Fun
    Reply With Quote #7

    all the hats we tried are like a foot above the players head so it kinda looks bad, any fix for that?

    still a fun mod, spawning a couple gman's in the air, left people confused lol. also can i only spawn hl2 models? or is there someway to spawn TF2 models, as its in a completely different directory.

    Last edited by Inflikted; 03-08-2009 at 05:36.
    Inflikted is offline
    Arg!
    Veteran Member
    Join Date: Jul 2008
    Location: Australia
    Old 03-08-2009 , 16:57   Re: Model Fun
    Reply With Quote #8

    We struggled with this one, problem is, if you put the hat neatly on players head the it covers the players eye level and all they see is, say, gman feet.
    __________________
    Arg! is offline
    CrimsonGT
    Veteran Member
    Join Date: Oct 2007
    Location: Gainesville, FL
    Old 03-08-2009 , 22:24   Re: Model Fun
    Reply With Quote #9

    Yup, proper hats are not doable with sourcemod alone. I have hat code completely handled by my MMS plugin for that reason.
    __________________
    CrimsonGT is offline
    resin
    Member
    Join Date: Dec 2008
    Location: Valve's Underbelly
    Old 03-14-2009 , 22:59   Re: Model Fun
    Reply With Quote #10

    anyway to make it so it saves the models to peoples steam ids? so i dont have to redo it everytime they join? O and another question, the plugin is working fine, i wore alyx as a hat for a bit. But when i try to load my own .mdl files (that i got from an amx hat mod) the server crashes. I tries setting sv_pure to 0, and i have it so my server forces clients to download the models from my downloadurl. The models are also on the server in the same directory. i have no idea what could be causing the crashes.

    Last edited by resin; 03-15-2009 at 00:08.
    resin is offline
    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 20:55.


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