Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Point system
#1
i would like to know how to make a working point system.
Reply

#2
Hashtables
Look in EpicZombieMod[Unfinished] thread, there's code

thanks to @JariZ he's learned me how hashtables do work Big Grin
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
do you mean zombie epidemic mod?
i have the old version but i dont understand it Sad
Reply

#4
Then learn C#?
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#5
(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>();
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#6
Why not just use self.points? Curious to know since I am working on optimizing my code a bit.
Would like to make a donation? Click here
Reply

#7
(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.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#8
It's a black ops thread, everyone failed including @master131
Reply

#9
(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
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#10
lol yer im reading this thinking "wtf" , to much mw3 for you guys .. xD
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Upgrade my point system from files to Database, help? EnVi Sweden Rocks 11 9,478 08-03-2013, 23:31
Last Post: EnVi Sweden Rocks
  [Request] Login / Register System? South2AKA 5 5,063 07-17-2013, 13:50
Last Post: surtek
Wink [Release] Shop system for Infected gametype Nekochan 125 77,345 07-05-2013, 18:09
Last Post: mohammadnanaa
  Help Icon/point on radar 8q4s8 2 2,828 05-06-2013, 16:49
Last Post: 8q4s8
  Ban system xGo 3 3,430 12-07-2012, 19:42
Last Post: 8q4s8
  [Request] Halo 2 MLG style Sheild system. Twizzy 2 2,516 07-25-2012, 02:08
Last Post: Twizzy
  [Release] Mod Menu System Beta1 d0h! 3 4,899 06-27-2012, 04:52
Last Post: GamingTV
  New DLC Available: Jagged Alliance - Back in Action: Point Blank DLC Steam 0 2,073 06-22-2012, 12:48
Last Post: Steam
Sad Petition to remove Rendflex's 10 point warning JariZ 3 2,837 06-04-2012, 19:04
Last Post: SuperNovaAO
  [Release] BO Ultimate Admin System V1 alistair3149 31 25,113 04-06-2012, 09:56
Last Post: OrangePL

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.