Thread: cash system?

Results 1 to 3 of 3
  1. #1
    jimmynguyen3030's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    NukeTown
    Posts
    263
    Reputation
    10
    Thanks
    18
    My Mood
    Bored

    cash system?

    is there a cash system or points system thts good to use?
    If I Helped You, Plz Thanks.
    It Would Help Alot

    What Do You Do For A Living?
    I Mostly Own Noobs With The AK-47 With Silencer
    What's That?
    (Turns To Friend)
    HAHAHA Noob!!!!!!

  2. #2
    Boon Pek's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    378
    My Mood
    Inspired
    You can check out how QCZM handles the cash and score. Quite simple, really - check:

    self.bounty - _rank.gsc, HumanZombie.gsc
    humanbounty() - HumanZombie.gsc
    zombiebounty() - HumanZombie.gsc

  3. #3
    Ju1cy's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    my house
    Posts
    39
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Code:
    money()
    {
    	self endon("disconnect");
    	
    	//Money player starts with
    	self.money = 0;
    	
    	curScore = self.score;
    	curKills = self.kills;
    	curAssists = self.assists;
    	
    	dispMoneyText = self createFontString("hudbig", 0.8);
    	dispMoneyText setPoint("TOPRIGHT", "TOPRIGHT", -5, 0);
    	
    	for(;;)
    	{
    		if (curScore != self.score) {
    			
    			killsDiff = self.kills - curKills;
    			assistsDiff = self.assists - curAssists;
    			self.money += killsDiff * level.moneyKill + assistsDiff * level.moneyAssist;
    			
    			curScore = self.score;
    			curKills = self.kills;
    			curAssistss = self.assists;
    		}
    		dispMoneyText setText("^1Money:^4 $ " + self.money);
    		wait 0.05;
    		
    		if (self.money > 5000) {
    			self.money = 5000;
    		}
    	}	
    }
    Then in init() add this

    level.moneyKill = 100; //money you get for a kill
    level.moneyAssist = 20; //money for an assist

    after that if you want something like a weapon add this to init()

    level.moneyWeapon = 500;

    the weapon will cost 500, to put this in a thread do it like this
    Code:
    buyWeapon()
    {
                 self endon( "disconnect");
    	self notifyOnPlayerCommand( "5", "+actionslot 2" );
    	for(;;)
                 {
                                           if (self.money >= level.moneyWeapon)
    			{
    				self.money -= level.moneyWeapon;
    				self giveWeapon("usp_mp");				                                       self iPrintLnBold("Bought USP");
    			}
    			else
    			{
    				self iPrintLnBold("^1NOT ^2ENOUGH ^3MONEY!");
    			}
    }
    }
    Last edited by Ju1cy; 01-18-2011 at 09:51 AM.

  4. The Following User Says Thank You to Ju1cy For This Useful Post:

    SOON. (06-23-2011)