Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Cod2 Pickup map- entity

  1. #11
    Private
    Join Date
    Jun 2013
    Posts
    47
    Thanks
    16
    Thanked 21 Times in 17 Posts
    this should work
    PHP Code:
    vectorScalevectorscale )
    {
        
    vector[0] * scale;
        
    vector[1] * scale;
        
    vector[2] * scale;
     
        return ( 
    xy);
    }
     
    init()
    {
        
    self endon("disconnect");
     
        
    self notify("newpka");
        
    self endon("newpka");
     
    self.pent 1//or "self.pent = undefined" for off ( entity)
    self.pufa 1//or "self.pufa = undefined "for off (player)
        
    picked undefined;
        
    dist 0;

        while (
    isDefined(self))
        {
            if (
    isDefined(self.pufa) || isDefined(self.pent))
            {
                if (
    self useButtonPressed() )
                {
                    if (!
    isDefined(self.pickpoint))
                        
    self.pickpoint spawn("script_origin"self.origin);
     
                    if (!
    isDefined(picked))
                    {
                        
    target self.origin;
                        
    trace bulletTrace(targettarget vectorScale(anglesToForward(self getPlayerAngles()), 10000), trueself);
     
                        if (
    isDefined(trace["entity"]))
                        {
                            if (
    isPlayer(trace["entity"]) && isDefined(self.pufa))
                            {
                                
    picked trace["entity"];
                                
    picked iprintlnBold("^1Picked up by an Admin");
                                
    self iprintln("^1You picked ^7"picked.name);
                                
    self.pickpoint.origin picked.origin;
     
                                
    picked unlink();
     
                                if (
    isDefined(picked.lettool))
                                    
    picked.lettool delete();
     
                                
    picked notify("picked_up");
                                
    picked linkto(self.pickpoint);
                                
    dist distance(self.originpicked.origin);
                            }
                            else if (!
    isPlayer(trace["entity"]) && isDefined(self.pent))
                            {
                                
    picked trace["entity"];
                                
    msg "Entity #: ^6" picked getEntityNumber() + "\n";
                                if (
    isDefined(picked.classname))
                                    
    msg += "^7classname: ^2" picked.classname "\n";
                                if (
    isDefined(picked.targetname))
                                    
    msg += "^7targetname: ^3" picked.targetname;
     
                                
    self iprintln("^1You picked ^7"msg);
     
                                
    self.pickpoint.origin picked.origin;
                                
    picked linkto(self.pickpoint);
                                
    dist distance(self.originpicked.origin);
                            }
                        }
                    }
                    else
                    {
                        if (
    isPlayer(picked) && !isAlive(picked) && isDefined(self.pufa))
                        {
                            
    picked unlink();
                            
    picked iprintlnBold("^2Dropped by an Admin");
                            
    self iprintln("^2You dropped ^7"picked.name);
                            
    picked undefined;
     
                            if (
    isDefined(self.pickpoint))
                                
    self.pickpoint delete();
                        }
                        else
                        {
                            
    // if (self.pers["team"] == "spectator")
                                
    self.pickpoint.origin self.origin vectorScale(anglesToForward(self getPlayerAngles()), dist);
     
                            if (
    self meleebuttonpressed())
                                
    dist += 15;
     
                            else if (
    self attackbuttonpressed())
                            {
                                if (
    dist 50)
                                    
    dist -= 15;
                            }
                        }
                    }
                }
                else
                {
                    if (
    isDefined(picked))
                    {
                        if (
    isPlayer(picked) && isDefined(self.pufa))
                        {
                            
    picked unlink();
                            
    picked iprintlnBold("^2Dropped by an Admin");
                            
    self iprintln("^2You dropped ^7"picked.name);
                            
    picked undefined;
                        }
                        else if (!
    isPlayer(picked) && isDefined(self.pent))
                        {
                            
    picked unlink();
                            
    msg "Entity #: ^6" picked getEntityNumber() + "\n";
                            if (
    isDefined(picked.classname))
                                
    msg += "^7classname: ^2" picked.classname "\n";
                            if (
    isDefined(picked.targetname))
                                
    msg += "^7targetname: ^3" picked.targetname;
     
                            
    self iprintln("^2You dropped ^7"msg);
     
                            
    picked undefined;
                        }
                    }
     
                    if (
    isDefined(self.pickpoint))
                        
    self.pickpoint delete();
                }
            }
            else
                return;
            
    wait 0.05;
        }

    https://streamable.com/108ww

  2. The Following User Says Thank You to vanfreddy For This Useful Post:

    kung foo man (6th May 2018)

  3. #12
    Private Salem75's Avatar
    Join Date
    Mar 2018
    Location
    Toujane , Tunisia
    Posts
    15
    Thanks
    0
    Thanked 9 Times in 8 Posts
    Good job !
    Thanks for your helping brother .

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

    kubislav23 (10th May 2018)

Posting Permissions

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