View Single Post
Plugin Info:     Modification:          Category:         
commonbullet
Veteran Member
Join Date: Oct 2005
Old 11-23-2005 , 20:16   Player Model 2.13c
Reply With Quote #1

Description

This is an extension of scriptyboy's plugin "Model by SteamID".

Sets models to players, humans and bots. You may set custom or default models to a player

- humans - set models by SteamID or by IP
- bots - set models by name

Installation:

- Default install for the plugin
- Place/create the models.ini inside amxmodx/configs

CS 1.6 Users:
Install custom models into
cstrike/models/player/[custommodelname]/[custommodelname].mdl
i.e
cstrike/models/player/arab/arab.mdl

CZ Users:
Install custom models into
czero/models/player/[custommodelname]/[custommodelname].mdl
i.e
czero/models/player/fbi/fbi.mdl

Module Required:
Cstrike

models.ini[/size]
Code:
;Models.ini configuration:
;-------------------------
;  
; 1) Syntax: "[Steamid|IP|Botname]" "[unique model name]"
;
; examples:
;"STEAM_0:0:1234567" "chickenmodel"
;"127.0.0.1" "chickenmodel"
;
; chickenmodel.mdl model will be set to a player no matter which team he’s in.
;
; 2) Syntax: "[Steamid|IP|Botname]" "[T modelname]" "[CT modelname]"
;
; examples:
;"STEAM_0:0:1234567" "chickenmodel" "t800"
;"127.0.0.1" "chickenmodel" "t800"
;
; if the player is a Terrorist his model will be chickenmodel.mdl; if he’s a CT, he’ll be t800.mdl
;
; 3) Syntax: "[Steamid|IP|Botname]" "#[model menu option number]"
; 
; examples:
;"STEAM_0:0:1234567" "#2"
;"127.0.0.1" "#2"
;
; - As if a player selected "2" in team menu – particularly useful for setting ;bots models
;   
;   #1 : urban,terror
;   #2 : gsg9,leet
;   #3 : sas,arctic
;   #4 : gign,guerilla
;   #5 : spetsnaz,militia (czero only)
;
; - Bots don’t have steamid, but you can set their model by using their names ;instead.
;   Names only work for bots.
; examples:
;"Joe" "#3"
;"Vinny" "stalone" "bush"
;"Gabe" "duke"
;
; 4) You can set a default bot model scheme. An individual bot model setting ;overwrites this one
; Syntax: "*BOTDEFAULT" {"[unique model name]"}|{"[T model]" "[CT model]"}|{"#[menu number]"}
;
; examples:
;"*BOTDEFAULT" "#4"
;"*BOTDEFAULT" "iglesias" "rickmartin"
;"*BOTDEFAULT "shakira"
;
; 5) Syntax: "*[force precache model name]"
; You might want to force to precache a model (without a player id linked to it), so
; you can use later in game.
;
; examples:
;"*arab"
;"*chickenmodel"
;
; 6) Set a model only if a user is in a specific team
; Syntax: ["[Steamid|IP|Botname]|*BOTDEFAULT|*DEFAULT" "_" "[CT Model]"] |
;         ["[Steamid|IP|Botname]|*BOTDEFAULT|*DEFAULT" "[T Model]" "_"]
;
; examples:
; "SteamId:whatever" "_" "alien4"
; "SteamId:whatever" "predator" "_"
;
; 7) Replace a selected model
; Syntax: "*REPLACE" "[model]" "[model to replace]"
;
; example:  
; "*REPLACE" "gign" "guerilla"
; (replaces gign for guerilla)
;
; 8) Make a default model for humans
; Syntax: "*DEFAULT" "T Model" "CT Model"
;
; example:
; "*DEFAULT" "guerilla" "gign"
Console Commands (ADMIN_KICK access):

amx_playermodel_ini
Display models.ini list

amx_playermodel_models
Display default models and all custom models available in models/player folder. Custom models that have been precached in current game session (by playermodel plugin) are marked with a (*).

amx_playermodel_set [steamid|ip|botname] [#modelindex] | [model1] [model2] | [uniquemodel]
1) Set lines the same well as described in model.ini (without quotes)
Examples:
amx_playermodel_set 127.0.0.1 urban gign
amx_playermodel_set *BOTDEFAULT #2
amx_playetmodel_set STEAM_0:0:1234567 predator2

2) There's another way to use it so you can easily get Steamid or IP from users that are connected to your server. Suppose Chuck is playing in your server and you want him to wear the famous "chicken suit" model because he deserves the best. But you can't figure what is his steamid or ip, or maybe you don't want to type all that stuff. So you just type:

amx_playermodel_set &Chuck chickenmodel

this will fetch Chuck's steamid and place it correctly in models.ini. Alternatively you could set the model by Chuck's IP:

amx_playermodel_set %Chuck chickenmodel

Obviously this can only be made if the player you want to include is connected to the server. Chuck is a nice example, I must recognize that sometimes it's just easier to type the steamid than those odd player names.

amx_playermodel_del [linenumber]
delete a models.ini line. You can retrieve models.ini line numbers by typing amx_playermodel_ini or amx_playermodel_del (no args).

Observations

Do not abuse by using too many custom models - it wouldn't be nice for clients to download them, it may slow down your server and even crash it.

Credits
This is based on scriptyboy's idea and plugin "Model by SteamID".
Thanks to people who's helped the previous version and consequently this one.
{NM}JRBLOODMIST, Suicid3, v3x, Zenith77.
Thanks to people at Scripting Help session.

Log:
Last Version download : 4977
Attached Files
File Type: sma Get Plugin or Get Source (playermodel.sma - 42206 views - 31.5 KB)
File Type: zip models_ini.zip (1.0 KB, 30840 views)

Last edited by commonbullet; 08-25-2007 at 17:59.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet