Aby w pełni korzystać z serwisu należy się zarejestrować. Można to zrobić TUTAJ
Zapraszamy także na Forum
Ten aplet jest widoczny tylko dla niezarejestrowanych użytkowników!
Strona Główna · Poradniki · Download · Forum · Linki · FAQ Sierpień 21 2017 14:03:58
Zobacz Temat
cod2mod - Jedyny polski portal wyłącznie nt. tworzenia map i modów do Call of Duty 2 | Pomoc | Wszystko
Autor Jak zainstalować?
~BrOna
Użytkownik

Dodane dnia 27-05-2013 16:49
Sory za kolejny podobny post, ale tym razem nie wiem jak załączyć go na serwer :
Rank mod, instrukcja po angielsku (również w dziale download)
Mógłby ktoś powiedzieć jak go zainstalować na serwerze ?


Due to overwhelming requests (ahum) I decided to release this script.


_stattracking.gsc: http://pastebin.com/yPwKAddn
ranks_config.txt: http://pastebin.com/rZp5N9rA

_stattracking goes in your mod (serverside is preferred) and
ranks_config.txt goes in the scriptdata folder of your fs_game/main folder, serverside only.

Readme:

Functions you can call within this file:
-init(); CALL THIS FUNCTION ONLY AT THE START OF THE GAME
-addstat(stat,amount);
-updatestats();
-getstat(stat);

How to use:

Call [player] addstat(stat,amount) with a statistic and an amount to add to that statistic
Example: self addstat("deaths",1);
Example: attacker addstat("kills",1);

After you added all the stats you wanted to write, call [player] updatestats();
Example: self updatestats();
Example: attacker updatestats();

You can also get a stat from a player, and, to avoid errors, you most likely will use the function i created for this: getstat(stat)
Example: if(self getstat("rank")>30)
Example: if(attacker getstat("xp")>1000)

Do not manually assign values to the self.stats[] array!
Example of what NOT TO DO: self.stats["kills"]=30;
Example of what NOT TO DO: attacker.stats["deaths"]++;

To add more stats to track: simply add them to the level.stats array in init_stattracking(). Then, write your own script to increase them at given moments :)



[advice] To update huds based on stats that are added, piggyback on the addstat() function. Add a case in the addstat() function, and call whatever you use to update your hud from there.
[advice] To substract certain things from a statfile, just call addstat([stat], [amount]) with a negative amount. Example: self addstat("xp",-1000);
[advice] Due to some shortcuts in the scripting, piggybacking on the addstat to update huds based on rank-changes does not work. Piggyback on the promoted() function to update your rank-dependent huds accordingly.


Legal stuff:

You can use, modify, distribute the contents of this file.
You cannot sell the contents or the modified contents of this file.
If the file is modified, you MUST publish it if someone asks for it.
You cannot ask money for this file
If this file was sold to you, you were tricked and should get a refund!
If you do not agree with above terms, DO NOT USE THIS FILE!
I took great care of this coding, so if anything breaks, or causes damage (ie. data loss) I will NOT be responsible

Edytowane przez explo32wunderwaffe dnia 29-05-2013 14:54
Wyślij Prywatną Wiadomość
Skocz do Forum: