Raised This Month: $ Target: $400
 0% 

[CSS] Random Skin/Model Change


Post New Thread Reply   
 
Thread Tools Display Modes
Author
LumiStance
AlliedModders Donor
Join Date: Jan 2009
Location: Northern California
Plugin ID:
1318
Plugin Version:
1.0.5
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    5 
    Plugin Description:
    Gives each player a random custom skin.
    Old 12-08-2009 , 21:17   [CSS] Random Skin/Model Change
    Reply With Quote #1

    Description
    Gives each player a random custom skin. You can specify between 1 to 8 separate models per team. When the plugin is enabled, the player is given a random model every spawn. Disabling the plugin will revert player models back to the standard CSS models. The models used can be changed by updating ini files and doing a map change.

    No plugin code modification required to change customs models used.
    *.mdl file names are extracted from model ini files. No CVAR's used.
    Comments, leading, and trailing white space allowed in ini files.

    Servers using this mod: http://www.game-monitor.com/search.p..._version=1.0.5

    Compatibility
    I have tested and used this plugin on my server only
    • Linux Source Dedicated Server
    • Counter Strike Source
    • Gun Game Death Match
    • SourceMod 1.2.4
    • Server Address SrcDS.LumiStance.com
    If you want to know if it is compatible with your server, feel free to try it out.

    Files
    cstrike/addons/sourcemod/plugins/sm_skinapp.smx
    cstrike/addons/sourcemod/configs/models_ct.ini
    cstrike/addons/sourcemod/configs/models_t.ini

    Installation
    The two ini files below are configured for models from TechKnow's model site. See http://techknowmodels.19.forumer.com/index.php Unless you have these 4 models on your server, you MUST modify these file for the plugin to function.
    1. Have model files in place on server
    2. If applicable, have bz2 copies in place on fast url server
    3. Configure both ini files to specify which models per team
    4. Have ini and smx files in correct location on server
    5. Load the plugin (i.e. sm plugins refresh)
    6. List models found with sm_skinapp list
    7. Change the map for new models to take effect
    The plugin will wait for a map change if it is loaded in the middle of a round.
    This ensures that clients download the files required to render the models.
    Make sure you copy the files to you fastdownload web server and all filenames are correct.

    If you see big red ERRORS
    This means that the client can't find the model files specified.
    Check for typo's. Make sure client is able download missing files.
    Check your fast url server's logs.
    The model files should end up under this folder on the client:
    Code:
    [Program Files]\Steam\SteamApps\[SteamUserName]\counter-strike source\cstrike
    Background
    Based upon TechKnow's masterchief Theme model changer plugin
    http://forums.alliedmods.net/showthread.php?t=77692
    sm_masterchief based partially on Preds Menu
    Posted 2008 - 09/19

    Meng maintains a Fork of TechKnow's plugin for applying custom skins to certain players (admins/bot/all)
    http://forums.alliedmods.net/showthread.php?t=98261
    http://forums.alliedmods.net/showpos...0&postcount=17
    Posted 2009 - 07/24

    Uses SetEntityModel instead of SDK Calls, removing need for a custom gamedata file.
    Thanks DJ Tsunami for suggetion
    http://forums.alliedmods.net/showpos...2&postcount=10
    Posted 2008 - 09/26

    Commands
    sm_skinapp - Lists available commands and plugin status
    sm_skinapp 0 - Disable plugin and reset player models to game default now
    sm_skinapp 1 - Enable plugin; Changes models now if not waiting for map change
    sm_skinapp list - Lists models found in ini files

    Changelog
    1.0.5 - 2009 - 12/06
    Replaced SDK Calls with SetEntityModel
    Removed CVAR's
    Added code to match /\*\.mdl$/ in ini files
    Replaced code to strip trailing newline in ini file with TrimString
    Added code to support multiple models per team
    Added code to prevent model change without client download files
    Added reporting and minor error handling
    Added code to list models found

    1.0 - 2008 - 09/19
    TechKnow's original sm_masterchief.sp
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_skinapp.sp - 9407 views - 8.0 KB)
    File Type: ini models_ct.ini (1.8 KB, 5128 views)
    File Type: ini models_t.ini (1.2 KB, 4401 views)
    __________________

    Last edited by LumiStance; 03-24-2010 at 04:26. Reason: Remove redundant text
    LumiStance is offline
    smithy
    SourceMod Donor
    Join Date: Sep 2008
    Location: United Kingdom
    Old 12-09-2009 , 10:42   Re: [CSS] Random Skin/Model Change
    Reply With Quote #2

    hi my friend great idea currently using this on our server , i have one request for this , we use a few bots on our server and wondered if you wouldnt mind excluding them from this so they stay with the default skins.

    Great work much appreciated

    best regards

    smithy
    smithy is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 12-09-2009 , 17:25   Re: [CSS] Random Skin/Model Change
    Reply With Quote #3

    Quote:
    Originally Posted by smithy View Post
    hi my friend great idea currently using this on our server , i have one request for this , we use a few bots on our server and wondered if you wouldnt mind excluding them from this so they stay with the default skins.

    Great work much appreciated

    best regards

    smithy
    If you haven't already download sm_skinapp.sp into:
    /cstrike/addons/sourcemod/scripting

    Insert this on line 239
    if (IsFakeClient(client_index)) return;

    Compile the revised sm_skinapp.sp and replace the sm_skinapp.smx in your plugins folder with the new one

    Last edited by LumiStance; 12-09-2009 at 17:33.
    LumiStance is offline
    Xp3r7
    SourceMod Donor
    Join Date: Jul 2006
    Old 12-10-2009 , 12:14   Re: [CSS] Random Skin/Model Change
    Reply With Quote #4

    We have an admin model plugin on our sever right now and are using 4 Christmas themed admin models (Santa, Grinch, MilitiaSanta and Jack Skellington) from Techknows site.

    If I set this plugin up so we can have a Santa (CT model) vs Grinch (T model) round or 2 (by turning it on/off via the cvar), will it change admins models that are using the other 2 models I have and will it conflict with the admin model plugin I already have?
    __________________
    Xp3r7 is offline
    Send a message via MSN to Xp3r7
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 12-10-2009 , 17:48   Re: [CSS] Random Skin/Model Change
    Reply With Quote #5

    Quote:
    Originally Posted by Xp3r7 View Post
    We have an admin model plugin on our sever right now and are using 4 Christmas themed admin models (Santa, Grinch, MilitiaSanta and Jack Skellington) from Techknows site.

    If I set this plugin up so we can have a Santa (CT model) vs Grinch (T model) round or 2 (by turning it on/off via the cvar), will it change admins models that are using the other 2 models I have and will it conflict with the admin model plugin I already have?
    My best guess is that both plugins use the same method and times (player spawn) to change the players model. Which ever plugin makes that most recent change will be what everyone sees.

    Will anyone be excessively offended if you, the server operator, change their models for a few rounds?

    Also, you can modify this plugin to exclude admins. I think inserting this onto line 239 should do the trick:
    if (GetUserFlagBits(client_index) & ADMFLAG_CUSTOM5) return;

    Last edited by LumiStance; 12-15-2009 at 14:55. Reason: Correct client to client_index
    LumiStance is offline
    smithy
    SourceMod Donor
    Join Date: Sep 2008
    Location: United Kingdom
    Old 12-15-2009 , 07:39   Re: [CSS] Random Skin/Model Change
    Reply With Quote #6

    Hi my friend

    I have tried altering the script with the suggestions u have made above , and i get these errors when trying to compile

    Code:
     
    /home/groups/sourcemod/upload_tmp/phpXNARKe.sp(239) : error 017: undefined symbol "client"
    /home/groups/sourcemod/upload_tmp/phpXNARKe.sp(241) : warning 217: loose indentation
    /home/groups/sourcemod/upload_tmp/phpXNARKe.sp(242) : warning 217: loose indentation
    I added both the above commands on line 239

    Code:
     
    if (GetUserFlagBits(client) & ADMFLAG_CUSTOM5) return; 
    if (IsFakeClient(client_index)) return;
    Any help would be appreciated

    best regards

    smithy
    smithy is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 12-15-2009 , 15:00   Re: [CSS] Random Skin/Model Change
    Reply With Quote #7

    Quote:
    Originally Posted by smithy View Post
    undefined symbol "client"
    My appologies, use client_index per the function signature, not client (I edited my previous post with the correction.

    Loose Indentation Warnings are just that. They're not fatal, just add or remove tabs at the beginning of the line to make them go away.

    If you want to change the admin level, see http://docs.sourcemod.net/dox/_i_adm...48ec73af7b6815

    Last edited by LumiStance; 12-15-2009 at 15:05.
    LumiStance is offline
    smithy
    SourceMod Donor
    Join Date: Sep 2008
    Location: United Kingdom
    Old 12-16-2009 , 04:59   Re: [CSS] Random Skin/Model Change
    Reply With Quote #8

    Quote:
    Originally Posted by LumiStance View Post
    My appologies, use client_index per the function signature, not client (I edited my previous post with the correction.

    Loose Indentation Warnings are just that. They're not fatal, just add or remove tabs at the beginning of the line to make them go away.

    If you want to change the admin level, see http://docs.sourcemod.net/dox/_i_adm...48ec73af7b6815
    Thanks works perfect , much appreciated

    best regards

    smithy
    smithy is offline
    raub9rx
    New Member
    Join Date: Dec 2009
    Old 12-23-2009 , 11:36   Re: [CSS] Random Skin/Model Change
    Reply With Quote #9

    Quote:
    Originally Posted by Xp3r7 View Post
    We have an admin model plugin on our sever right now and are using 4 Christmas themed admin models (Santa, Grinch, MilitiaSanta and Jack Skellington) from Techknows site.

    If I set this plugin up so we can have a Santa (CT model) vs Grinch (T model) round or 2 (by turning it on/off via the cvar), will it change admins models that are using the other 2 models I have and will it conflict with the admin model plugin I already have?
    i would ask you.. where did you get the models ?
    I search and search and search i didnt found anything whats a Christmas Skin.

    Can you help me please ?
    raub9rx is offline
    Slash The Mighty
    Member
    Join Date: May 2006
    Location: Vault 13
    Old 12-23-2009 , 15:24   Re: [CSS] Random Skin/Model Change
    Reply With Quote #10

    Code:
    Error Vertex File for 'player/ct_urban.mdl' checksum 639885657 should be -1825505500
    Error Vertex File for 'player/ct_urban.mdl' checksum 639885657 should be -1825505500
    Error Vertex File for 'player/ct_urban.mdl' checksum 639885657 should be -1825505500
    Error Vertex File for 'player/ct_gsg9.mdl' checksum -1809542714 should be 1889312638
    Error Vertex File for 'player/ct_urban.mdl' checksum 639885657 should be -1825505500
    Error Vertex File for 'player/ct_urban.mdl' checksum 639885657 should be -1825505500
    Error Vertex File for 'player/ct_urban.mdl' checksum 639885657 should be -1825505500
    Error Vertex File for 'player/ct_gsg9.mdl' checksum -1809542714 should be 1889312638
    Lovely. About 20 pages of spam with this in my console, after I added the player models.

    They all downloaded fine, it just isn't loading.

    Probably doing something wrong, I tried to change all the models to this;
    http://www.fpsbanana.com/skins/71393

    models_ct.ini
    Code:
    models/shogunner_equals_fat/chubby_heads/ct_gign.dx80.vtx
    models/shogunner_equals_fat/chubby_heads/ct_gign.dx90.vtx
    models/shogunner_equals_fat/chubby_heads/ct_gign.mdl
    models/shogunner_equals_fat/chubby_heads/ct_gign.phy
    models/shogunner_equals_fat/chubby_heads/ct_gign.sw.vtx
    models/shogunner_equals_fat/chubby_heads/ct_gign.vvd
    models/shogunner_equals_fat/chubby_heads/ct_gign.xbox.vtx
    models/shogunner_equals_fat/chubby_heads/ct_gsg9.dx80.vtx
    models/shogunner_equals_fat/chubby_heads/ct_gsg9.dx90.vtx
    models/shogunner_equals_fat/chubby_heads/ct_gsg9.mdl
    models/shogunner_equals_fat/chubby_heads/ct_gsg9.phy
    models/shogunner_equals_fat/chubby_heads/ct_gsg9.sw.vtx
    models/shogunner_equals_fat/chubby_heads/ct_gsg9.vvd
    models/shogunner_equals_fat/chubby_heads/ct_gsg9.xbox.vtx
    models/shogunner_equals_fat/chubby_heads/ct_sas.dx80.vtx
    models/shogunner_equals_fat/chubby_heads/ct_sas.dx90.vtx
    models/shogunner_equals_fat/chubby_heads/ct_sas.mdl
    models/shogunner_equals_fat/chubby_heads/ct_sas.phy
    models/shogunner_equals_fat/chubby_heads/ct_sas.sw.vtx
    models/shogunner_equals_fat/chubby_heads/ct_sas.vvd
    models/shogunner_equals_fat/chubby_heads/ct_sas.xbox.vtx
    models/shogunner_equals_fat/chubby_heads/ct_urban.dx80.vtx
    models/shogunner_equals_fat/chubby_heads/ct_urban.dx90.vtx
    models/shogunner_equals_fat/chubby_heads/ct_urban.mdl
    models/shogunner_equals_fat/chubby_heads/ct_urban.phy
    models/shogunner_equals_fat/chubby_heads/ct_urban.sw.vtx
    models/shogunner_equals_fat/chubby_heads/ct_urban.vvd
    models/shogunner_equals_fat/chubby_heads/ct_urban.xbox.vtx
    models_t.ini
    Code:
    models/shogunner_equals_fat/chubby_heads/t_arctic.dx80.vtx
    models/shogunner_equals_fat/chubby_heads/t_arctic.dx90.vtx
    models/shogunner_equals_fat/chubby_heads/t_arctic.mdl
    models/shogunner_equals_fat/chubby_heads/t_arctic.phy
    models/shogunner_equals_fat/chubby_heads/t_arctic.sw.vtx
    models/shogunner_equals_fat/chubby_heads/t_arctic.vvd
    models/shogunner_equals_fat/chubby_heads/t_arctic.xbox.vtx
    models/shogunner_equals_fat/chubby_heads/t_guerilla.dx80.vtx
    models/shogunner_equals_fat/chubby_heads/t_guerilla.dx90.vtx
    models/shogunner_equals_fat/chubby_heads/t_guerilla.mdl
    models/shogunner_equals_fat/chubby_heads/t_guerilla.phy
    models/shogunner_equals_fat/chubby_heads/t_guerilla.sw.vtx
    models/shogunner_equals_fat/chubby_heads/t_guerilla.vvd
    models/shogunner_equals_fat/chubby_heads/t_guerilla.xbox.vtx
    models/shogunner_equals_fat/chubby_heads/t_leet.dx80.vtx
    models/shogunner_equals_fat/chubby_heads/t_leet.dx90.vtx
    models/shogunner_equals_fat/chubby_heads/t_leet.mdl
    models/shogunner_equals_fat/chubby_heads/t_leet.phy
    models/shogunner_equals_fat/chubby_heads/t_leet.sw.vtx
    models/shogunner_equals_fat/chubby_heads/t_leet.vvd
    models/shogunner_equals_fat/chubby_heads/t_leet.xbox.vtx
    models/shogunner_equals_fat/chubby_heads/t_phoenix.dx80.vtx
    models/shogunner_equals_fat/chubby_heads/t_phoenix.dx90.vtx
    models/shogunner_equals_fat/chubby_heads/t_phoenix.mdl
    models/shogunner_equals_fat/chubby_heads/t_phoenix.phy
    models/shogunner_equals_fat/chubby_heads/t_phoenix.sw.vtx
    models/shogunner_equals_fat/chubby_heads/t_phoenix.vvd
    models/shogunner_equals_fat/chubby_heads/t_phoenix.xbox.vtx
    __________________
    ---

    Last edited by Slash The Mighty; 12-23-2009 at 15:26.
    Slash The Mighty is offline
    Send a message via AIM to Slash The Mighty Send a message via MSN to Slash The Mighty Send a message via Skype™ to Slash The Mighty
    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 12:18.


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