Results 1 to 10 of 37

Thread: Pickup Script ? who have?! :D

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Both the first and the second script look an AWEFUL lot like a script I wrote back in 2011:

    PHP Code:
    pickups()
    {
        
    self endon("disconnect");
        
    self endon("killed_player");
        
    self endon("spawned_player");
        
    self endon("spawned");
        
    picked=undefined;
        if(
    isdefined(self.pickpoint))
            
    self.pickpoint delete();
        
    self.pickpoint=spawn("script_origin",self.origin);
        
    dist=0;
        for(;;)
        {
            if(
    self usebuttonpressed())
            {
                if(!
    isdefined(picked))
                {
                    
    trace=bullettrace(self geteye()+(0,0,20),self geteye()+(0,0,20)+maps\mp\_utility::vectorscale(anglestoforward(self getplayerangles()),99999),true,self);
                    if(
    trace["fraction"]!=1)
                    {
                        if(
    isdefined(trace["entity"]))
                        {
                            if(
    isplayer(trace["entity"]))
                            {
                                
    picked=trace["entity"];
                                
    picked iprintlnbold("picked up by admin");
                                
    self iprintlnbold("you picked up ",picked.name);
                                
    self.pickpoint.origin=picked.origin;
                                
    picked linkto(self.pickpoint);
                                
    dist=distance(self.origin,picked.origin);
                            }
                        }
                    }
                }
                else
                {
                    if(!
    isplayer(picked)||!isalive(picked))
                        
    picked=undefined;
                    else
                    {
                        
    self.pickpoint.origin=self geteye()+maps\mp\_utility::vectorscale(anglestoforward(self getplayerangles()),dist);
                        if(
    self meleebuttonpressed())
                            
    dist+=15;
                        if(
    self attackbuttonpressed())
                        {
                            if(
    dist>50)
                                
    dist-=15;
                        }
                    }

                }
            }
            else if(
    isdefined(picked)||!isplayer(picked)||!isalive(picked))
            {
                if(!
    isplayer(picked))
                    
    picked=undefined;
                else
                {
                    
    picked unlink();
                    
    picked iprintlnbold("dropped by admin");
                    
    self iprintlnbold("you dropped ",picked.name);
                    
    picked=undefined;
                }
            }
            
    wait 0.05;
        }

    More proof: 4th post in http://www.codjumper.com/forums/view...hp?f=3&t=13824

    Also here: http://modsonline.com/Forums-top-143715-0.html#741490
    Last edited by IzNoGoD; 17th January 2017 at 10:43.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Libcod git repo:



    My post:

    Quote Originally Posted by IzNoGoD View Post
    like a script I wrote back in 2011:
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Tags for this Thread

Posting Permissions

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