Results 1 to 3 of 3
  1. #1
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115

    From player to self

    I had this code,
    but when lets say its 6 on your team, then you buy for all six and you lose ALOT of money.
    Code:
    DoWep(id,text,wep)
    {
            self endon("disconnect");
            for(;;)
            {
                    (foreach player in level.players) - this was here, forgot the real code
                    {
                    if(distance(self.origin,player.origin) <75 && player.cash >= 25)
                    player setlowermessage(id,text,undefined,25);
                            else if(distance(self.origin,player.origin) <75 && player.cash < 25)
                            splayer setlowermessage(id,"You do not have enough ^1Cash!",undefined,50);
                            if(distance(self.origin,player.origin) <75 && player.cash >= 25 && player UseButtonPressed())
                            {
                                    wep = player getCurrentWeapon();
                                    player giveMaxAmmo(wep);
                                    player.cash -= 25;
                                    self iprintlnbold("Cash left: ^3"+playerf.cash);
                                    wait 1;
                            }
                            if(distance(self.origin,player.origin) >75) player clearlowermessage(id);
                    }
                    wait 0.05;
            }
    }
    So I tried

    Code:
    DoWep(id,text,wep)
    {
            self endon("disconnect");
            for(;;)
            {
                    {
                    if(distance(self.origin) <75 && self.cash >= 25)
                    self setlowermessage(id,text,undefined,25);
                            else if(distance(self.origin) <75 && self.cash < 25)
                            self setlowermessage(id,"You do not have enough ^1Cash!",undefined,50);
                            if(distance(self.origin) <75 && self.cash >= 25 && self UseButtonPressed())
                            {
                                    wep = self getCurrentWeapon();
                                    self giveMaxAmmo(wep);
                                    self.cash -= 25;
                                    self iprintlnbold("Cash left: ^3"+self.cash);
                                    wait 1;
                            }
                            if(distance(self.origin) >75) self clearlowermessage(id);
                    }
                    wait 0.05;
            }
    }
    But nothing happens.
    Halpppp?

  2. #2
    jimmynguyen3030's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    NukeTown
    Posts
    263
    Reputation
    10
    Thanks
    18
    My Mood
    Bored
    what mod is this for?
    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!!!!!!

  3. #3
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    Something im working on..
    shhhh :3