AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSS] Random Skin/Model Change (https://forums.alliedmods.net/showthread.php?t=111266)

LumiStance 12-08-2009 20:17

[CSS] Random Skin/Model Change
 
3 Attachment(s)
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

smithy 12-09-2009 09:42

Re: [CSS] Random Skin/Model Change
 
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

LumiStance 12-09-2009 16:25

Re: [CSS] Random Skin/Model Change
 
Quote:

Originally Posted by smithy (Post 1011276)
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

Xp3r7 12-10-2009 11:14

Re: [CSS] Random Skin/Model Change
 
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?

LumiStance 12-10-2009 16:48

Re: [CSS] Random Skin/Model Change
 
Quote:

Originally Posted by Xp3r7 (Post 1012219)
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;

smithy 12-15-2009 06:39

Re: [CSS] Random Skin/Model Change
 
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

LumiStance 12-15-2009 14:00

Re: [CSS] Random Skin/Model Change
 
Quote:

Originally Posted by smithy (Post 1017619)
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

smithy 12-16-2009 03:59

Re: [CSS] Random Skin/Model Change
 
Quote:

Originally Posted by LumiStance (Post 1017940)
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

raub9rx 12-23-2009 10:36

Re: [CSS] Random Skin/Model Change
 
Quote:

Originally Posted by Xp3r7 (Post 1012219)
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 ?

Slash The Mighty 12-23-2009 14:24

Re: [CSS] Random Skin/Model Change
 
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



All times are GMT -4. The time now is 06:12.

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