Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 6 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Map + Mod Releases
Release announcements of custom maps and mods and other content related to Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Easy-to-use Modulair acocunt system
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Map + Mod Releases
Posted: Wednesday, Oct. 26, 2011 10:59 pm
Hi all
I might be releasing a free-to-use (credit me) account system script which you can easily expand/adapt.

Its for use on non-cracked servers only atm, as the cracked servers do no support getguid().

It comes with a few built-in functions, which are: checkrank(), promoted() and counter() (for time_played).

Here is the readme. Tell me if you like it:


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

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();


If you want to read a stat from a player, just use: [player].stats["[stat goes here]"];
Example: if(self.stats["rank"]>30)
Example: if(attacker.stats["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"]++;


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, or any mod based on this file (you can however charge for custom functions that do NOT rely on this file to work)

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
*/


Anyone interested in obtaining this script?

edited on Oct. 26, 2011 07:01 pm by IzNoGoD
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Map + Mod Releases
Posted: Saturday, Oct. 29, 2011 10:50 am
No one interested? Ill keep the script private then....
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 Map + Mod Releases
Posted: Saturday, Oct. 29, 2011 11:41 am
The mapping and modding scene is very quiet at the moment, someone may find it of use but with new games coming out and less supporting modding.. the future is bleak
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD2 Map + Mod Releases
Posted: Saturday, Oct. 29, 2011 12:37 pm
Ofcourse we are interested! But i think the script was really hard to make. Are u sure u want to share it? U will get spammed how to let it work on people their server xD. I'm interested in ur script. I think i will learn very much from it.
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Map + Mod Releases
Posted: Saturday, Oct. 29, 2011 04:36 pm
Script is about the easiest thing in the world, as you can read in the readme i posted in firstpost.

It also has a ranking system in it, which reads the ranks from a file.
Snippet from said file:

0,Private First Class,
30,Private First Class I,
120,Private First Class II,
270,Lance Corporal,
480,Lance Corporal I,
750,Lance Corporal II,
1080,Corporal,
1470,Corporal I,
1920,Corporal II,
2430,Sergeant,
3000,Sergeant I,
3650,Sergeant II,
4380,Staff Sergeant,
5190,Staff Sergeant I,
6080,Staff Sergeant II,
7050,Gunnery Sergeant,

You can ofcourse fully customize this :)
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD2 Map + Mod Releases
Posted: Saturday, Oct. 29, 2011 07:53 pm
Easiest thing in the world? U use writefile and openfile etc. Thats still a blackhole in the cod2 scene
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Map + Mod Releases
Posted: Saturday, Oct. 29, 2011 08:35 pm
nwestenberg writes...
Quote:
Easiest thing in the world? U use writefile and openfile etc. Thats still a blackhole in the cod2 scene


Didnt say it was easy to write (for me it was), but easy to USE.

Only a few functions to call, no hassle with write/readfile etc :)

Edit: why is it hard to use write/readfile? damn, those functions are way too easy....
And it is exactly why i am thinking of leaving the cod2 scene: too easy to create stuff lol
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD2 Map + Mod Releases
Posted: Sunday, Oct. 30, 2011 11:29 am
Then u "must" publish it :) or send me a pm or send me on xfire :P
Share |
br0kz
General Member
Since: Jun 15, 2012
Posts: 6
Last: Jun 27, 2012
[view latest posts]
Level 0
Category: CoD2 Map + Mod Releases
Posted: Saturday, Jun. 16, 2012 12:08 am
Im interesting in the archive update and go add me xfire wizard1995
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Map + Mod Releases
Posted: Saturday, Jun. 16, 2012 05:51 pm
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
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Map + Mod Releases

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»