Pickup Scripit

Have a question you need to ask? Need help? Ask here!

Moderator: Core Staff

Post Reply
Amitoz
CJ Wannabe
CJ Wannabe
Posts: 4
Joined: November 13th, 2012, 5:49 am
PSN ID: OGZxProBouncer

Pickup Scripit

Post by Amitoz » February 23rd, 2013, 5:07 pm

Hello!
I Was wondering if any of you had the Pickup script?

-Amitoz

DeltaSpades
CJ Wannabe
CJ Wannabe
Posts: 44
Joined: January 10th, 2013, 7:07 pm

Re: Pickup Scripit

Post by DeltaSpades » February 27th, 2013, 8:43 pm

here's the script

both Admins and VIPs can use the pick up

Code: Select all

/* ______      ____      __
  / ____/___  / __ \    / /_  ______ ___  ____  ___  _____ _________  ____ ___
 / /   / __ \/ / / /_  / / / / / __ `__ \/ __ \/ _ \/ ___// ___/ __ \/ __ `__ \
/ /___/ /_/ / /_/ / /_/ / /_/ / / / / / / /_/ /  __/ /  _/ /__/ /_/ / / / / / /
\____/\____/_____/\____/\__,_/_/ /_/ /_/ .___/\___/_/  (_)___/\____/_/ /_/ /_/
                                      /*/
 
#include codjumper\_cj_utility;
 
init()
{
        /* You may use this file to add your custom             *
         * scripts without requiring a stock file hack. *
         * Thread your functions inside 'init()' and            *
         * place your custom functions below.           */
 
        thread onPlayerConnect();
       
 
 
}
 
onPlayerConnect()
{
        for(;;)
        {
                level waittill( "connected", player );
               
                player thread onPlayerSpawned();
        }
}
 
onPlayerSpawned()
{
        for(;;)
        {
                self waittill( "spawned_player" );
       
                self thread _AdminPickup();
       
        }
}
  
_AdminPickup()
{
   self endon("disconnect");
 
        while(1)
        {        
                while(!self secondaryoffhandButtonPressed() || !self.cj["status"] >= 1)
                {
                        wait 0.05;
                }
               
                start = self getEye();
                end = start + maps\mp\_utility::vector_scale(anglestoforward(self getPlayerAngles()), 999999);
                trace = bulletTrace(start, end, true, self);
                dist = distance(start, trace["position"]);
 
                ent = trace["entity"];
 
                if(isDefined(ent) && ent.classname == "player")
                {
                        if(isPlayer(ent))
                                ent IPrintLn("^1You've been picked up by the admin ^2" + self.name + "^1!");
 
                        self IPrintLn("^1You've picked up ^2" + ent.name + "^1!");
 
                        linker = spawn("script_origin", trace["position"]);
                        ent linkto(linker);
 
                        while(self secondaryoffhandButtonPressed())
                        {
                                wait 0.05;
                        }
 
                        while(!self secondaryoffhandButtonPressed() && isDefined(ent))
                        {
                                start = self getEye();
                                end = start + maps\mp\_utility::vector_scale(anglestoforward(self getPlayerAngles()), dist);
                                trace = bulletTrace(start, end, false, ent);
                                dist = distance(start, trace["position"]);
 
                                if(self fragButtonPressed() && !self adsButtonPressed())
                                        dist -= 15;
                                else if(self fragButtonPressed() && self adsButtonPressed())
                                        dist += 15;
 
                                end = start + maps\mp\_utility::vector_Scale(anglestoforward(self getPlayerAngles()), dist);
                                trace = bulletTrace(start, end, false, ent);
                                linker.origin = trace["position"];
 
                                wait 0.05;
                        }
     
                        if(isDefined(ent))
                        {
                                ent unlink();
                                       
                                if(isPlayer(ent))
                                        ent IPrintLn("^1You've been dropped by the admin ^2" + self.name + "^1!");
 
                                self IPrintLn("^1You've dropped ^2" + ent.name + "^1!");
                        }
 
                        linker delete();
                }
 
                while(self secondaryoffhandButtonPressed())
                {
                        wait 0.05;
                }
        }
}

borczyk
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: April 13th, 2012, 8:08 am
Location: Poland

Re: Pickup Scripit

Post by borczyk » February 28th, 2013, 10:25 pm

How activate this script. I paste it on z_codjumper.iwd. Server run and what now?

DeltaSpades
CJ Wannabe
CJ Wannabe
Posts: 44
Joined: January 10th, 2013, 7:07 pm

Re: Pickup Scripit

Post by DeltaSpades » March 1st, 2013, 9:47 am

borczyk wrote:How activate this script. I paste it on z_codjumper.iwd. Server run and what now?
With default controls use 4 to pick peoples up and release them again, to move people I think its G to move people closer to you and aim+G moves them away from you

borczyk
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: April 13th, 2012, 8:08 am
Location: Poland

Re: Pickup Scripit

Post by borczyk » March 1st, 2013, 9:51 am

Ok. I paste script in z_codjumper.iwd and script is ready? Not must any activate?

DeltaSpades
CJ Wannabe
CJ Wannabe
Posts: 44
Joined: January 10th, 2013, 7:07 pm

Re: Pickup Scripit

Post by DeltaSpades » March 1st, 2013, 9:59 am

borczyk wrote:Ok. I paste script in z_codjumper.iwd and script is ready? Not must any activate?
Did you put it in the addon.gsc file, if so it should work fine

borczyk
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: April 13th, 2012, 8:08 am
Location: Poland

Re: Pickup Scripit

Post by borczyk » March 1st, 2013, 10:06 am

Ye i put it in Addon.gsc. Later tested. I need script no clip for admins and vips only when i click Grenade + Use - no clip. I see this script on other server. It good work.

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests