Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vugi99/onset-networked-clothes
https://github.com/vugi99/onset-networked-clothes
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vugi99/onset-networked-clothes
- Owner: vugi99
- License: unlicense
- Created: 2020-04-21T10:48:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-30T11:21:44.000Z (over 4 years ago)
- Last Synced: 2024-06-20T18:33:38.154Z (5 months ago)
- Language: Lua
- Size: 8.79 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-onset - networked-clothes - Set networked (synced) clothes. (Packages and Plugins / Other packages)
README
# onset-networked-clothes
#### Informations
* This package can be used to set networked clothes#### Config
* if you want to put default clothes to players (when they spawn) you can use defaultClothesPreset or defaultCustomClothes variables at the start of clothes.lua
* defaultClothesPreset = preset id
* defaultCustomClothes = Custom Clothes Table#### Custom Clothes Table Structure
* a Custom Clothes Table Should be like that
```
{
body = false,
clothing0 = false,
clothing1 = false,
clothing2 = false,
clothing3 = false,
clothing4 = false,
clothing5 = false,
clothing6 = false,
clothing7 = false,
clothing8 = false,
clothing9 = false
}
```
* for each part you can do :
```
-- false = don't change , nil = destroy thing (you can only put nil at skeletal mesh path)
{
nil, -- skeletal mesh path
{1,1,1}, -- relative scale or put false
{0,0,0}, -- relative rotation or put false
false, -- relative location or put false
false -- {material path , material slot} or put false
}
```
* Example :
```
{
body = {"/Game/CharacterModels/SkeletalMesh/BodyMerged/HZN_CH3D_Normal04_LPR",{1.3,1.3,1.3},false,false,{"/Game/CharacterModels/Materials/HZN_Materials/M_HZN_Body_NoShoesLegsTorso",0}},
clothing0 = {"/Game/CharacterModels/SkeletalMesh/HZN_CH3D_Hair_Business_LP"},
clothing1 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_FormalShirt_LPR"},
clothing2 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_FormalPants_LPR"},
clothing3 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_BusinessShoes_LPR"},
clothing4 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_TacticalGlasses_LPR",false,false,{0.0, 0.0, 3.5}}
}
```
#### Developers
* Get Networked clothes
```
-- server,client
GetPlayerPropertyValue(player, "NetworkedClothes")
GetNPCPropertyValue(npc, "NetworkedClothes")
-- returns a table
-- returned tables can be like this
--[[
{
type = "preset",
clothes = presetid
}
{
type = "custom",
clothes = Custom Clothes Table
}
]]--
```
* You need to include onset-networked-clothes files to your package to use functions
* Set Networked Clothing Preset
```
-- server
SetPlayerNetworkedClothingPreset(player,presetid)
SetNPCNetworkedClothingPreset(npc,presetid)
return true on success , false on error
```
* Set Networked Custom Clothes
```
-- server
SetPlayerNetworkedCustomClothes(player,Custom Clothes Table)
SetNPCNetworkedCustomClothes(npc,Custom Clothes Table)
return true on success , false on error
```