![]() |
|
Point system - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: Point system (/Thread-Point-system--7863.html) Pages:
1
2
|
Point system - Killer_xD - 07-28-2012 i would like to know how to make a working point system. RE: Point system - Nekochan - 07-28-2012 Hashtables Look in EpicZombieMod[Unfinished] thread, there's code thanks to @JariZ he's learned me how hashtables do work
RE: Point system - Killer_xD - 07-28-2012 do you mean zombie epidemic mod? i have the old version but i dont understand it
RE: Point system - DidUknowiPwn - 07-28-2012 Then learn C#? RE: Point system - master131 - 07-29-2012 (07-28-2012, 17:15)JayDi Wrote: Hashtables 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>();RE: Point system - Cyborgking - 07-29-2012 Why not just use self.points? Curious to know since I am working on optimizing my code a bit. RE: Point system - Nekochan - 07-29-2012 (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. 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. RE: Point system - JariZ - 07-29-2012 It's a black ops thread, everyone failed including @master131 RE: Point system - master131 - 07-30-2012 (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.
RE: Point system - rotceh_dnih - 08-01-2012 lol yer im reading this thinking "wtf" , to much mw3 for you guys .. xD |