Garry's Mod

Garry's Mod

302 次評價
Custom Animated Flags
3
3
   
獎勵
加入最愛
已加入最愛
移除最愛
Content Type: Addon
Addon Type: Tool
Addon Tags: Roleplay, Realism
檔案大小
發佈於
更新時間
28.838 MB
2021 年 12 月 15 日 上午 10:38
2024 年 2 月 21 日 上午 5:02
10 項更新註記 (檢視)

訂閱以下載
Custom Animated Flags

在 niumikus 的 1 個收藏中
Nucondrian Addons
9 個項目
描述
Welcome to Custom Animated Flags!

This Addon allows you to spawn flags, and apply your own images to them!

Applying Images
To apply an image
1.Select the Flag loader tool.
2.Select an image.
3.Click on the pole of a Flag.


How to add custom images

1.Navigate to your GarrysMod folder.
2.go to GarrysMod>garrysmod>materials>caf_flags
If the last folder (caf_flags) does not exist, just create it.
3.Put your images in here! (Jpg and png supported)

Images may not contain ".", whitespaces or any special characters in their names!

Note:
-To refresh the file explorer ingame, click on the main folder again.
-The Addon supports sub-folders, but they will not update upon refreshing.
-Subfolders required to be configurated in GarrysMod>garrysmod>data>caf>subfolders.json
-DO NOT remove "world/" from the subfolder config! but you can remove "example/"!

Multiplayer

For this to work in multiplayer, all players require the image file.
The image does not have to have the same name, but the image has to be exactly the same.
Subfolders do not have to match either.

If a player does not have the image, the flag will default for him. (Currently Germany)

Flag Collection Addons
You can also publish an addon with a collection of flags.
Please put them in <your addon name>/materials/caf_flags/<some subfolder>/
<some subfolder> being either the name of your addon, or whatever represent the flags within.

Requires one lua file:
In which you

hook.Add("CAFAddSubfolder","<Unique_identifier>",function ()
AddCAFFolder("folder/")
end)

Put this file in lua/autorun/client
If you're having problems, contact me.

Everything is saveable!

Some side notes:

When sharing images for multiplayer;
If you're using discord to share the images, send them in ZIPs. Otherwise discord might compress them and the image might not be exactly the same. (And therefore not get recognised)

Margain
There's a 1% margain on all sides of the picture.

Cannot see flags on Server i just joined
Either you do not have the required images, or try running the console command caf_refesh.

Configuration of subfolders
GarrysMod>garrysmod>data>caf>subfolders.json
["world/","example/"]
always add a ,"<subfolder>/" if you want a new subfolder.
Should support subfolders of subfolders, in this case do "<subfoldera>/<subfolderb>/".

CONVARS
CAF_ALLOW_UPDATE 1
0 to disallow CAF Material updates.
1 to allow CAF Material updates.
When disabled only cached flags will load
If you're not actively adding images, i recommend to set this to 0! And caching the folder! (world/ is automatically cached)

Console Commands
caf_createcache <folder>/
Create a Cache for this folder, assumes content will no longer change.
Use caching if CAF_ALLOW_UPDATE is set to 0
Only cache folders you do not intend to change anymore.
Do not cache "/"

caf_destroycache
Deletes the cache.

caf_stats
Shows stats.

caf_reloadcache
Purges the loaded cache, and reloads everything from the cache file.
May cause issues if a Flag Collection Addon is mounted
There is actually no reason for you to use this

caf_forceload_all
Forces caf to consider loading all images. Already cached Images are exempt.

Tip!
When in doubt, destroy the cache!

Help for multiplayer debugging from: Kerolos and Vulkyrie
熱門討論 檢視全部(7)
9
2024 年 8 月 20 日 下午 11:52
置頂: Issues 2024
niumikus
5
2024 年 6 月 19 日 下午 12:49
couldn't find the flag folder
Parrel
4
2024 年 2 月 10 日 下午 4:26
My map crashes after i enable this addon.
Stepan Bandera
115 則留言
Motoess 1 月 16 日 上午 4:53 
Thank you! I do have a question on how you compile the model. I have attempted it and recompiling it causes it to break. Mind adding me on steam so that we can talk about it? I appreciate it!
niumikus  [作者] 1 月 16 日 上午 4:47 
Go ahead! If you intend to re-publish it though, be sure to add credits
Motoess 1 月 16 日 上午 2:26 
Hey, would you mind if I decompile this model for use?
Wojciech 2024 年 10 月 27 日 下午 12:31 
Add the 1606 British Empire flag.
PλULTHE666TH™ 2024 年 8 月 18 日 下午 10:06 
Deustchschland flagge ist gut
Speedy McSpeed 2024 年 8 月 11 日 上午 5:33 
Could you add square flags?
монолит 2024 年 7 月 26 日 上午 11:04 
Iv made so many cursed images go on my flag so far, it's genuinely amazing. :AmokSoldier: 10/10.
(90377) Sedna 2024 年 7 月 25 日 下午 12:28 
i cant find the caf_folder please help:steamsad:
AliBabaHajjHasan 2024 年 7 月 3 日 上午 8:31 
How can I permaprop a flag and the flag material I choose?
шоколад 2024 年 6 月 19 日 上午 11:14 
this is the best flag addon for gmod :steamthumbsup: