Results 1 to 9 of 9
  1. #1
    MuLtiHuN7eR's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    My Mood
    Worried

    Unhappy Perks in Zombie Mod

    Im editing quarantine chaos zombie mod and i added in the menu random perk option. But i have one big problem:
    even when the player has all perks nothing can stop him spending more cash.

    Please help...thx

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    make a if statement then.

    If player have all perks, then remove or refuse buy or money gain...

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #3
    MuLtiHuN7eR's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    My Mood
    Worried
    Something like:

    if((self.perkz[steadyaim]==0||1)&&(self.perkz[sitrep]==0||1))
    {
    ...
    }else{
    println("You have all perks!");
    }

    or

    if((self.perkz[steadyaim]==0)||(self.perkz[steadyaim]==1)&&(self.perkz[sitrep]==0)||(self.perkz[sitrep]==1))
    {
    ...
    }else{
    println("You have all perks!");
    }
    ??
    Last edited by MuLtiHuN7eR; 08-31-2011 at 03:06 AM.

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by MuLtiHuN7eR View Post
    Something like:

    if((self.perkz[steadyaim]==0||1)&&(self.perkz[sitrep]==0||1))
    {
    ...
    }else{
    println("You have all perks!");
    }

    or
    if((self.perkz[steadyaim]==0)||(self.perkz[steadyaim]==1)&&(self.perkz[sitrep]==0)||(self.perkz[sitrep]==1))
    {
    ...
    }else{
    println("You have all perks!");
    }
    ??
    well, self _hasperk == "perk" I think that is the right one. You find it in the GSC Modding Codes

    EDIT:
    I made a mistake

    here:
    if( self _hasperk("*perk*") && self _hasperk("*perk*") );
    Last edited by Jorndel; 08-31-2011 at 03:11 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. #5
    dsds1's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    2
    My Mood
    Fine
    Code:
    self unsetPerk("perk");
    it clears sepicific perk temporary (you can give the perk at any time you want)
    Last edited by dsds1; 08-31-2011 at 05:44 AM. Reason: wrong defenation

  6. #6
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by dsds1 View Post
    Code:
    self unsetPerk("perk");
    it clears sepicific perk temporary (you can give the perk at any time you want)
    Em, what you want to do with this?
    He want to check if he got all the perks or not.
    Not remove one. Even, I believe the code you gave is wrong.

    self _unsetperk("*Perk*");

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  7. #7
    dsds1's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    2
    My Mood
    Fine
    Quote Originally Posted by Jorndel View Post
    Em, what you want to do with this?
    He want to check if he got all the perks or not.
    Not remove one. Even, I believe the code you gave is wrong.
    mah mistake, but I've got question and different answer at same time
    question:in logical meaning, you did anybody got ALL perks?

    answer for topic:hmm, Jorndel is right, you can use if statement but it will take too long, there is many ways to do the same thing but in shorter time

    way 1:
    make giving perk increases variable integer(name a new one at onPlayerSpawned and in above for(; statement), and if someone got the same perk again, do not increase the variable, put else statement for it, then if variable could'nt increase;the perks in player is full, put the if statement
    Code:
    if(self.gotperk == the number of all perks) //note:this is an example
    way 2:
    similar to way one, but this changes your mod logic

    if player got all perk, name a new notify to self
    Code:
    self notify("selfgotallperks");
    then at increasing cash thread, put
    Code:
    self endon("selfgotallperks");
    hope helped

  8. #8
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic


    This made some sense but not so good.

    1: Explain in easy-clean-text
    2: Tell how he is going to use it, and a example of that.
    3: Include extra information.
    4: What he/she can do to solve the problem or problems that occurs.

    I know, how this may sound.
    But just to help YOU to improve your Help threads & Answers.
    (Well, I don't do this all the time myself, but step 1 is important.)

    EDIT:
    Well, I though I should feedback you.

    Well, as I see this, there is just 1 WAY. not 3....
    And, you got some other ways to do this.

    1: Make a array list of all the perks.
    2: Notify when the player buyd a perk, and what perk it was.
    And when notifyed change a value of something. like:
    Code:
    p1 = 0;
    self notify("perk1");
    p1 = 1;
    But the easyest is to make a "Base" Array list of all the perks.
    OR
    When the user buy the perk, it will removed/hiden. From the menu.
    And then the buy option for the perk he allready got is hiden/removed.
    I think this is the easyest way to do it.
    If he buy, remove/hide if for that player.
    Last edited by Jorndel; 08-31-2011 at 06:28 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  9. #9
    dsds1's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    2
    My Mood
    Fine
    Quote Originally Posted by Jorndel View Post


    This made some sense but not so good.

    1: Explain in easy-clean-text
    2: Tell how he is going to use it, and a example of that.
    3: Include extra information.
    4: What he/she can do to solve the problem or problems that occurs.

    I know, how this may sound.
    But just to help YOU to improve your Help threads & Answers.
    (Well, I don't do this all the time myself, but step 1 is important.)
    thanks Jordnel, anyway(talking to the topic poster) here what you must do in step one:

    first, in _rank.gsc find for
    Code:
    onPlayerSpawned()
    second, like I said, add new integer variable
    Code:
    onPlayerSpawned() 
    { 
      self endon("disconnect"); 
      self.gotperk = 0; 
      for(;;) 
      { 
        self waittill("spawned_player"); 
        //other call of threads 
      } 
    }
    step 3:
    like Jordnel's replay, put if statements in player got perk
    Code:
    if(self _hasperk("perk"))
    step 4:
    Code:
    if(self.gotperk == number of all perks)
    Quote Originally Posted by Jordnel
    EDIT:
    Well, I though I should feedback you.

    Well, as I see this, there is just 1 WAY. not 3....
    And, you got some other ways to do this.

    1: Make a array list of all the perks.
    2: Notify when the player buyd a perk, and what perk it was.
    And when notifyed change a value of something. like:
    Code:
    p1 = 0;
    self notify("perk1");
    p1 = 1;
    But the easyest is to make a "Base" Array list of all the perks.
    OR
    When the user buy the perk, it will removed/hiden. From the menu.
    And then the buy option for the perk he allready got is hiden/removed.
    I think this is the easyest way to do it.
    If he buy, remove/hide if for that player
    yeaaaaaaaah, now you are talking about
    like this topic poster:
    put array list like what jordnel said
    Code:
    self.gotperk = [];
    then
    make new for statement like this
    Code:
    for(i = 0; i < 19; i++) 
    { 
     self.gotperk[i] 
     self waittill("boughtperk"); 
     self iPrintLnBold("perk bought"); 
    }
    Last edited by dsds1; 08-31-2011 at 06:38 AM.

Similar Threads

  1. Anyone know when update the zombies mod
    By Soul.Death in forum CrossFire Hacks & Cheats
    Replies: 11
    Last Post: 01-12-2010, 11:11 AM
  2. Cross fire zombie mod
    By davidarklord in forum CrossFire Hacks & Cheats
    Replies: 11
    Last Post: 01-02-2010, 10:11 PM
  3. zombie mod is a so so
    By acehammer12354 in forum Combat Arms Hacks & Cheats
    Replies: 8
    Last Post: 08-09-2009, 12:53 PM
  4. Zombie mod is coming to Combat arms!
    By iHazBalls in forum Combat Arms Europe Hacks
    Replies: 5
    Last Post: 07-18-2009, 02:04 AM
  5. Zombies mod
    By frfwolf in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 2
    Last Post: 04-26-2009, 04:07 PM