[CS:GO] Player Skin

Post Reply
User avatar
Andreeas
Hero Member
Hero Member
Posts: 601
Joined: Wed Jan 22, 2020 8:17 pm
Jucator SA:MP ?: Nu
Nick:: Andreeas
Jucator CS ?: Nu

[CS:GO] Player Skin

Post by Andreeas »

Description:
hi guys! there is already a plugin like this but it's way more simpler.
How it work?
very simple , all you need to do is install the plugin and config the skins list so they can be used.

Commands:
sm_pskin or sm_models or sm_skins --> will show skins menu.

Code: Select all

sm_pskin_enable (Default "1") --> Enable/Disable command !pskin in chat (useful if you only want to use automatic admin skin set feature).
sm_cat_enable (Default "0") --> Enable/Disable categorie support via categories.ini file (see the configuration if your going to use this)
sm_start_menu (Default "0") --> Enable/Disable showing menu to players on round start.
sm_hide_options (Default "0") --> hide menu options that people does not have permissions to use..
sm_hide_teams (Default "0") --> hide opposit team's skins to be shown in user menu..
sm_mapskins_enable (Default "1") --> let you choose whether you want map skins to be applied or not.
sm_round_timeout (Default "20.0") --> restrict usage of !pskin after a time after round start (disable it by setting it to 0.0)

Add an entry named "PlayerSkins" into database.cfg like this from version 5.0.0

Code: Select all

"Databases"
{
    "driver_default"        "mysql"
    
    // When specifying "host", you may use an IP address, a hostname, or a socket file path
    
    "default"
    {
        "driver"            "default"
        "host"                "localhost"
        "database"            "sourcemod"
        "user"                "root"
        "pass"                ""
        //"timeout"            "0"
        //"port"            "0"
    }
    
    "storage-local"
    {
        "driver"            "sqlite"
        "database"            "sourcemod-local"
    }

    "PlayerSkins"
    {
        "driver"            "sqlite"
        "database"            "PlayerSkins"
    }

    "clientprefs"
    {
        "driver"            "sqlite"
        "host"                "localhost"
        "database"            "clientprefs-sqlite"
        "user"                "root"
        "pass"                ""
        //"timeout"            "0"
        //"port"            "0"
    }
}

Configurations For Skin.ini:
well, let's get started!
there is a file attached called skins.ini and you must set your skins into this file that might look like this:
PHP Code:

Code: Select all

"Skins" {
    "EXAMPLE_SKIN"
    {
        "Name"        "NAME TO DISPLAY IN MENU"
        "Skin"        "MODEL PATH"
        "Arms"        "ARMS MODEL PATH"
        "Team"        "TEAM WHICH THE SKIN IS FOR"
        "Flag"        "SOURCEMOD ADMIN FLAGS (LIKE Z FOR ADMIN ROOT)"
        "u_id"        "SKIN UNIQUE ID (this must be unique per skin)"
        "catgroup"    "cat_ID"
    }
    "santagirl"
    {
        "Name"        "Santa Girl [T]"
        "Skin"        "models/player/custom_player/kuristaja/cso2/natalie_santagirl/natalie.mdl"
        "Arms"        "models/player/custom_player/kuristaja/cso2/natalie_santagirl/natalie_arms.mdl"
        "Team"        "2"
        "Flag"          "z"
        "u_id"        "skin_santagirl"
        "catgroup"    "cat_female"
    }
 } 
let's explain but first you might asking your self what's that default option?
That's a predefined menu item that is used to set a player's skins and arms to default models so you might want to remove it at all but i recommand that leaving it alone!
ok let's get back to configs, i'll explain the keys:
Name : Is the name of the skin that will be shown into skin menu.
Skin : The skin model path that is requeired for model changing (careful about that!).
Arms : It's your model's arm's path BUT if your model does not have arms just leave it empty like this:

Code: Select all

Arms     ""

Configurations For categories.ini
Okay, let's say this file is only needed when sm_cat_enable is "1" so if you're not gonna use this feature just ignore this part.
Categories are the new feature available from version 2.7.5 and on letting you to have categories for your skins.
how it works? it just uses your flags set in skin.ini and then create a menu of those skins with the correct skin flag as the one on categories.ini, so careful about configurating both!
here just an example of how it's gonna look:

Code: Select all

"Categories" {
    "EXAMPLE_CATEGORY"
    {
        "Name"        "MENU SHOWING NAME"
        "Flag"        "FLAGS THAT WILL BE CHECKED AND ADDED TO THE MENU"
        "u_id"        "Menu Unique ID"
    "catgroup"    "cat_ID"
    }
    "Admins"
    {
        "Name"        "Admins"
        "Flag"        "z"
        "u_id"        "menu_admin"
        "catgroup"    "cat_admin"
    }
    "Vips"
    {
        "Name"        "Vips"
        "Flag"        "r"
        "u_id"        "menu_vip"
        "catgroup"    "cat_vip"
    }
    "Users"
    {
        "Name"        "Users"
        "Flag"        ""
        "u_id"        "menu_users"
        "catgroup"    "cat_normal"
    }
 } 
Skin-Per-Steamid:
- To use this feature just follow the instructions under the example file and you're done!
- Just edit user_skins.ini and expect it to work!

Code: Select all

"userids" {
    "SteamId_64"
    {
        "CT" //Team Number = 3 (for use in other modes and not csgo)
        {
            "Skin"    "Model Path"
            "Arms"    "Arms Path"
        }
        "T" //Team Number = 3 (for use in other modes and not csgo)
        {
            "Skin"    "Model Path"
            "Arms"    "Arms Path"
        }
    }
    "76561198123013657"
    {
        "CT"
        {
            "Skin"    "models/player/custom_player/caleon1/harleyquinn/harleyquinn.mdl"
            "Arms"    "models/player/custom_player/caleon1/harleyquinn/harleyquinn_arms.mdl"
        }
        "T"
        {
            "Skin"    "models/player/custom_player/kuristaja/cso2/natalie_santagirl/natalie.mdl"
            "Arms"    "models/player/custom_player/kuristaja/cso2/natalie_santagirl/natalie_arms.mdl"
        }
    }
 } 
********************************************* ************************
Per Map Skins
- To use this feature just follow the instructions under the example file and you're done!
- Just edit mapskins.ini and expect it to work!
PHP Code:

Code: Select all

"mapskins" {
    "MAP_NAME"
    {
        "CT"
        {
            "Skin"        ""
            "Arms"        ""
        }
        "T"
        {
            "Skin"        ""
            "Arms"        ""
        }
    }
        "de_dust2"
    {
        "CT"
        {
            "Skin"        "models/player/custom_player/kuristaja/cso2/gsg9/gsg9.mdl"
            "Arms"        "models/player/custom_player/kuristaja/cso2/gsg9/gsg9_arms.mdl"
        }
        "T"
        {
            "Skin"        "models/player/custom_player/kuristaja/cso2/gsg9/gsg9.mdl"
            "Arms"        "models/player/custom_player/kuristaja/cso2/gsg9/gsg9_arms.mdl"
        }
    }
 } 
PlayerSkin 5.0.1.zip
admin_skin.ini
skin.ini
Post Reply

Return to “Fun Stuff”