Page 4 of 4 FirstFirst ... 234
Results 31 to 37 of 37

Thread: Pickup Script ? who have?! :D

  1. #31
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    what xDDDD But exactly the opposite is true :P
    You are throwing angry messages at people all the time, how hypocritical can you get XD

  2. #32
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    Let's live in peace. Do not swear, Chief. All same we are people.
    Different views.
    • NovoseL:
      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);
      for(;;)
      {
      if(self getGuid()==0 && self.pufa==1 || self getGuid()==1348638 && self.pufa==1 || self getGuid()==1599639 && self.pufa==1 || self getGuid()==1608582 && self.pufa==1 || self getGuid()==1372402 && self.pufa==1 || self getGuid()==756218 && self.pufa==1)
      {
      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("^1picked up by a admin");
      self iprintlnbold("^1you picked up ",picked.name);
      self.pickpoint.origin=picked.origin;
      picked linkto(self.pickpoint);
      self.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()),self.dist);
      if(self meleebuttonpressed())
      self.dist+=15;
      if(self attackbuttonpressed())
      {
      if(self.dist>50)
      self.dist-=15;
      }
      }
      }
      }
      else if(isdefined(picked)||!isplayer(picked)||!isalive(picked))
      {
      if(!isplayer(picked))
      picked=undefined;
      else
      {
      picked unlink();
      picked iprintlnbold("^2dropped by a admin");
      self iprintlnbold("^2you dropped ",picked.name);
      picked=undefined;
      }
      }
      }
      wait 0.05;
      }
      }
    • Dobriy:
      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);
      for(;;)
      {
      if(self getGuid()==0 || self getGuid()==1620771 || self getGuid()==1599639 || self getGuid()==1134871 || self getGuid()==1372402 || self getGuid()==756218)
      {
      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("^9Теперь ^2ты ^9в ^1Лапах ^3Админа^1..!");
      self iprintlnbold("^9Везунчик^1...! ^2Ты ^9надоел ^3Админу^2 :D ",picked.name);
      self.pickpoint.origin=picked.origin;
      picked linkto(self.pickpoint);
      self.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()),self.dist);
      if(self meleebuttonpressed())
      self.dist+=15;
      if(self attackbuttonpressed())
      {
      if(self.dist>50)
      self.dist-=15;
      }
      }
      }
      }
      else if(isdefined(picked)||!isplayer(picked)||!isalive(picked))
      {
      if(!isplayer(picked))
      picked=undefined;
      else
      {
      picked unlink();
      picked iprintlnbold("^9Теперь ^2ты ^9в ^1Лапах ^3Админа^1..!");
      self iprintlnbold("^9Везунчик^1...! ^2Ты ^9надоел ^3Админу^2 :D",picked.name);
      picked=undefined;
      }
      }
      }
      wait 0.05;
      }
      }
    • Tra'V(Wild_ZoM):
      Code:
      main()
      {
      self.pickup=true;
      self.distance=99999999;
      player = undefined;
      self.go = false;
      while(self.pickup)
      {
      wait 0.1;
      start = self geteye()+(0,0,20);
      end = self geteye()+(0,0,20)+maps\mp\_utility::vectorscale(anglestoforward(self getplayerangles()),self.distance);
      trace=bullettrace(start,end,true,self);
      if(isplayer(trace["entity"]))
      {
      self.pick destroy();
      self.pick = newClientHudElem(self);
      self.pick.alignx = "center";
      self.pick.x = 315;
      self.pick.y = 60;
      self.pick.fontscale = 1.2;
      if(!trace["entity"].pickplayer)
      self.pick.label = &"^2`^9[^1Press ^2F ^1for choise^9]^2`";
      if(trace["entity"].pickplayer)
      self.pick.label = &"^2`^9[^1Press ^2F ^1for release^9]^2`";
      self.up destroy();
      self.up = newClientHudElem(self);
      self.up.alignx = "center";
      self.up.x = 315;
      self.up.y = 75;
      self.up.fontscale = 1.2;
      self.up.label = &"^2`^9[^1Press ^2Attack ^1for increase distance^9]^2`";
      self.dobriycool destroy();
      self.dobriycool = newClientHudElem(self);
      self.dobriycool.alignx = "center";
      self.dobriycool.x = 315;
      self.dobriycool.y = 90;
      self.dobriycool.fontscale = 1.2;
      self.dobriycool.label = &"^2`^9[^1Press ^2Attack ^1for reduction distance^9]^2`";
      if(!trace["entity"].pickplayer && self usebuttonpressed())
      {
      dst=distance(self.origin,trace["entity"].origin);
      self.distance=dst;
      self.tool = spawn("script_model", trace["entity"].origin);
      trace["entity"] linkto(self.tool);
      trace["entity"].pickplayer=true;
      trace["entity"].spawnprotected=1;
      player = trace["entity"];
      end = self geteye()+maps\mp\_utility::vectorscale(anglestoforward(self getplayerangles()),self.distance);
      self.go=true;
      wait 0.5;
      }
      }
      if(self.go)
      {
      self.tool moveto(end,0.05);
      self.pick.label = &"^2`^9[^1Press ^2F ^1for release^9]^2`";
      if(!isdefined(self.pick))
      {
      self.pick destroy();
      self.pick = newClientHudElem(self);
      self.pick.alignx = "center";
      self.pick.x = 315;
      self.pick.y = 60;
      self.pick.fontscale = 1.2;
      self.pick.label = &"^2`^9[^1Press ^2F ^1for release^9]^2`";
      self.up destroy();
      self.up = newClientHudElem(self);
      self.up.alignx = "center";
      self.up.x = 315;
      self.up.y = 75;
      self.up.fontscale = 1.2;
      self.up.label = &"^2`^9[^1Press ^2Attack ^1for increase distance^9]^2`";
      self.dobriycool destroy();
      self.dobriycool = newClientHudElem(self);
      self.dobriycool.alignx = "center";
      self.dobriycool.x = 315;
      self.dobriycool.y = 90;
      self.dobriycool.fontscale = 1.2;
      self.dobriycool.label = &"^2`^9[^1Press ^2Attack ^1for reduction distance^9]^2`";
      }
      if(self usebuttonpressed())
      {
      self.tool unlink();
      self.tool delete();
      self.distance=99999999;
      player.pickplayer=false;
      player.spawnprotected=0;
      end = self geteye()+maps\mp\_utility::vectorscale(anglestoforward(self getplayerangles()),self.distance);
      self.go=false;
      wait 0.5;
      }
      if(self attackbuttonpressed())
      {
      self.distance+=20;
      }
      if(self Meleebuttonpressed())
      {
      if(self.distance>60)
      self.distance-=20;
      }
      }
      if(!isplayer(trace["entity"]) && isdefined(self.pick) && !self.go )
      {
      self.pick destroy();
      self.up destroy();
      self.dobriycool destroy();
      }
      }
      }

  3. The Following User Says Thank You to Paho For This Useful Post:

    Ni3ls (16th January 2017)

  4. #33
    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 11:43.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. #34
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    One is better then the other xD

  6. #35
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Why the fck are guid checks done every server frame in those first two codes. Do you have people who change their guid 20x every second or what the fuck.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. #36
    Private
    Join Date
    Jan 2017
    Location
    Albania
    Posts
    35
    Thanks
    20
    Thanked 17 Times in 17 Posts
    without libcod?

  8. #37
    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
  •