ItsMods

Full Version: Point system
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i would like to know how to make a working point system.
Hashtables
Look in EpicZombieMod[Unfinished] thread, there's code

thanks to @JariZ he's learned me how hashtables do work Big Grin
do you mean zombie epidemic mod?
i have the old version but i dont understand it Sad
Then learn C#?
(07-28-2012, 17:15)JayDi Wrote: [ -> ]Hashtables
Look in EpicZombieMod[Unfinished] thread, there's code

thanks to @JariZ he's learned me how hashtables do work Big Grin

Hashtables are ew, not to mention they leave unnecessary explicit type casting since it takes any object. You should be using Dictionaries.

Quote:There is little benefit to use Hashtable class if you are targeting for .NET Framework 2.0+. It's effectively rendered obsolete by Dictionary<TKey, TValue>.

Code:
// Zombie classes
Hashtable isIceZombie = new Hashtable();
Hashtable isBlastZombie = new Hashtable();
Hashtable isToxicZombie = new Hashtable();

// points
Hashtable Points = new Hashtable();

// commom
Hashtable Kills = new Hashtable();
Hashtable MKill = new Hashtable();

Code:
// Zombie classes (why did you even use an integer for these?)
Dictionary<string, bool> isIceZombie = new Dictionary<string, bool>();
Dictionary<string, bool> isBlastZombie = new Dictionary<string, bool>();
Dictionary<string, bool> isToxicZombie = new Dictionary<string, bool>();

// points
Dictionary<string, int> Points = new Dictionary<string, int>();

// commom
Dictionary<string, int> Kills = new Dictionary<string, int>();
Dictionary<string, int> MKill = new Dictionary<string, int>();
Why not just use self.points? Curious to know since I am working on optimizing my code a bit.
(07-29-2012, 11:31)Cyborgking Wrote: [ -> ]Why not just use self.points? Curious to know since I am working on optimizing my code a bit.

Fuu Fuu Fuu Fuu Fuu Fuu Fuu Fuu Fuu
It is NOT gsc modding. It is not modding.
We can't create custom values etc. Only by directionaries/system.io/hashtable

EDIT: oh nvm, it is black ops thread xDDDD
yea, it is possible,
put player.points = 0; in connect event.
Then do what do you want.
It's a black ops thread, everyone failed including @master131
(07-29-2012, 18:44)JariZ Wrote: [ -> ]It's a black ops thread, everyone failed including @master131

Doesn't matter, at least I gave you a coding tip. Sleepy
lol yer im reading this thinking "wtf" , to much mw3 for you guys .. xD
Pages: 1 2