Garry's Mod

Garry's Mod

297 rating
Custom Animated Flags
2
3
   
Penghargaan
Favorit
Difavoritkan
Batalkan favorit
Content Type: Addon
Addon Type: Tool
Addon Tags: Roleplay, Realism
Ukuran File
Diposting
Diperbarui
28.838 MB
15 Des 2021 @ 10:38am
21 Feb 2024 @ 5:02am
10 Catatan Perubahan ( lihat )

Berlangganan untuk mengunduh
Custom Animated Flags

Dalam koleksi 1 dari niumikus
Nucondrian Addons
Item 9
Deskripsi
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
Diskusi Populer Lihat Semua (7)
9
20 Agu 2024 @ 11:52pm
DISEMATKAN: Issues 2024
niumikus
5
19 Jun 2024 @ 12:49pm
couldn't find the flag folder
Parrel
4
10 Feb 2024 @ 4:26pm
My map crashes after i enable this addon.
Stepan Bandera
113 Komentar
Polski N (Riley) 27 Okt 2024 @ 12:31pm 
Add the 1606 British Empire flag.
xvil33 15 Sep 2024 @ 12:11pm 
it randomly changes back to the german flag
PλULTHE666TH™ 18 Agu 2024 @ 10:06pm 
Deustchschland flagge ist gut
Speedy McSpeed 11 Agu 2024 @ 5:33am 
Could you add square flags?
монолит 26 Jul 2024 @ 11:04am 
Iv made so many cursed images go on my flag so far, it's genuinely amazing. :AmokSoldier: 10/10.
Charon 25 Jul 2024 @ 12:28pm 
i cant find the caf_folder please help:steamsad:
AliBabaHajjHasan 3 Jul 2024 @ 8:31am 
How can I permaprop a flag and the flag material I choose?
шоколад 19 Jun 2024 @ 11:14am 
this is the best flag addon for gmod :steamthumbsup:
Spy Gaming 8 Jun 2024 @ 7:46pm 
i want great britain
niumikus  [pembuat] 15 Apr 2024 @ 12:50pm 
Did you click the root folder in the sTOOL UI?
The tree only lists the folders, the files are listed right next to it after clicking the Folder.