Results 1 to 9 of 9

Thread: dubble points

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    dubble points

    hello i create dubble points why notwork ?

    on callback_playerconnect()
    Code:
    if(!isDefined(self.czolgu))   self.czolgu = false;
    callback_playerkilled
    Code:
    				if(sMeansOfDeath == "MOD_MELEE")
    				{
    				     attacker.bash++;
    				     attacker.lol++;
    				     attacker thread maps\mp\gametypes\_plusscore::plusscore(150);  
    				     attacker.plusscore+=150;
    				     attacker.scoretoshow=150;
    				     attacker huntyaudobriy\_showbash::init();
    				     if(self.czolgu == true)
    				     {
    				         attacker thread maps\mp\gametypes\_plusscore::plusscore(150);  
    				         attacker.plusscore+=150;
    				         attacker.scoretoshow=150;
    				         attacker drczolg\dubble::bash();
    				         attacker.lol++;
    				         attacker.lol++;
    				     }
    ON SHOP :

    Code:
    		if(response == "dubble")
    		{
    			if(self.money >= 1750)
    			{
    				self.spent+=1750;
    
                            self iprintlnbold("^2. ^7Yo^9u ^7Bou^9ght ^7Dub^9ble ^7Poi^9nts");
                            self.czolgu = true;
    			}
    			if(self.money < 1750)
    			{
    			 self iprintlnbold("^2. ^7Yo^9u ^7d^9o ^7no^9t ^7ha^9ve ^7eno^9ugh ^7mon^9ey ^2`");
    			}
    
    			}

  2. #2
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    You didn't learn from the last time...
    Code:
    if(self.czolgu == true)
    change self to attacker

  3. The Following 2 Users Say Thank You to Ni3ls For This Useful Post:

    EvoloZz (26th February 2013),kung foo man (26th February 2013)

  4. #3
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    change self for all ? callback_playerconnect , shop , playerkilled?

  5. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    if(poster == "malycczolg")
    response = "change self to attacker";

    Do you even know what you are doing?

    same goes for your if(a) followed by if(!a). Use else.

    also stop messing around with the variables used by plusscore. You will only cause trouble. (.plusscore and .scoretoshow)

  6. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    EvoloZz (26th February 2013),kung foo man (26th February 2013)

  7. #5
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    Hah ,,, sorry i lern only

  8. #6
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    Change the self to attacker only in the callback_playerkilled, unless you include attacker somewhere else

  9. #7
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by malyczolg View Post
    Hah ,,, sorry i lern only
    Well, i did kinda tell you in your other thread too....

  10. #8
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    If you want to handle the attacker, who killed someone it attacker.XXXX
    If you want to handle the dude who died, its self.XXX

    Like:
    Code:
    If(attacker != self) //If a player suicide (killed himself and landed here)
    {
          self.killstreak = 0; //Set the killstreak of the dude who's dead to 0
          attacker.killstreak += 1; //Set +1 at the killstreak of the attacker
    }
    No ... No ... this is not possible .......

  11. #9
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Code:
    				     if(self.czolgu == true)
    				     {
    				         attacker thread maps\mp\gametypes\_plusscore::plusscore(150);  
    				         attacker.plusscore+=150;
    				         attacker.scoretoshow=150;
    				         attacker drczolg\dubble::bash();
    				         attacker.lol++;
    				         attacker.lol++;
    				     }
    Change self to attacker. It's not that hard to read

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •