Garry's Mod

Garry's Mod

297 Bewertungen
Custom Animated Flags
2
3
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
Content Type: Addon
Addon Type: Tool
Addon Tags: Roleplay, Realism
Dateigröße
Veröffentlicht
Aktualisiert
28.838 MB
15. Dez. 2021 um 10:38
21. Feb. 2024 um 5:02
10 Änderungshinweise (anzeigen)

Abonnieren zum Herunterladen
Custom Animated Flags

In 1 Kollektion von niumikus
Nucondrian Addons
9 Inhalte
Beschreibung
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
Beliebte Diskussionen Alle anzeigen (7)
9
20. Aug. 2024 um 23:52
ANGEHEFTET: Issues 2024
niumikus
5
19. Juni 2024 um 12:49
couldn't find the flag folder
Parrel
4
10. Feb. 2024 um 16:26
My map crashes after i enable this addon.
Stepan Bandera
113 Kommentare
Polski N (Riley) 27. Okt. 2024 um 12:31 
Add the 1606 British Empire flag.
xvil33 15. Sep. 2024 um 12:11 
it randomly changes back to the german flag
PλULTHE666TH™ 18. Aug. 2024 um 22:06 
Deustchschland flagge ist gut
Speedy McSpeed 11. Aug. 2024 um 5:33 
Could you add square flags?
монолит 26. Juli 2024 um 11:04 
Iv made so many cursed images go on my flag so far, it's genuinely amazing. :AmokSoldier: 10/10.
Charon 25. Juli 2024 um 12:28 
i cant find the caf_folder please help:steamsad:
AliBabaHajjHasan 3. Juli 2024 um 8:31 
How can I permaprop a flag and the flag material I choose?
шоколад 19. Juni 2024 um 11:14 
this is the best flag addon for gmod :steamthumbsup:
Spy Gaming 8. Juni 2024 um 19:46 
i want great britain
niumikus  [Autor] 15. Apr. 2024 um 12:50 
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.