Garry's Mod

Garry's Mod

287 évaluations
Custom Animated Flags
2
3
   
Récompenser
Ajouter aux favoris
Favoris
Retirer des favoris
Type de contenu: Addon
Type d'addon: Outil
Mots-clés d'addon: Jeu de rôle, Réalisme
Taille du fichier
Publié le
Mis à jour le
28.838 MB
15 déc. 2021 à 10h38
21 févr. à 5h02
10 notes de changement ( voir )

S'abonner pour télécharger
Custom Animated Flags

Dans 1 collection faite par niumikus
Nucondrian Addons
9 objets
Description
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
Discussions populaires Tout voir (7)
9
20 aout à 23h52
ÉPINGLÉ : Issues 2024
niumikus
5
19 juin à 12h49
couldn't find the flag folder
Parrel
4
10 févr. à 16h26
My map crashes after i enable this addon.
Stepan Bandera
114 commentaires
counterstrike newb 24 sept. à 13h30 
nazi
xvil33 15 sept. à 12h11 
it randomly changes back to the german flag
PλULTHE666TH™ 18 aout à 22h06 
Deustchschland flagge ist gut
Speedy McSpeed 11 aout à 5h33 
Could you add square flags?
монолит 26 juil. à 11h04 
Iv made so many cursed images go on my flag so far, it's genuinely amazing. :AmokSoldier: 10/10.
Mozambican Toriel 25 juil. à 12h28 
i cant find the caf_folder please help:steamsad:
Abubucasis 3 juil. à 8h31 
How can I permaprop a flag and the flag material I choose?
☭ Comrade_T-90MS ☭ 19 juin à 11h14 
this is the best flag addon for gmod :steamthumbsup:
SCP Foundation 8 juin à 19h46 
i want great britain
niumikus  [créateur] 15 avr. à 12h50 
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.