Server Config Help + Scripts Help

Chat area specifically for CoDJumper

Moderator: Core Staff

Post Reply
UH60Hawk
CJ Wannabe
CJ Wannabe
Posts: 4
Joined: August 16th, 2012, 11:59 pm
Gamertag: xSGxHawk

Server Config Help + Scripts Help

Post by UH60Hawk » August 17th, 2012, 12:02 am

So, I am doing the set cj_adminguid and I have 4 admins. I have it all setup right and the correct GUIDs but when I do it, only the first and third person is admin. The second and fourth is not.

Anyone mind helping me?

------------------------------------------------------------------------------------

Also,

How do I use addons.gsc?

I added the scripts that I wanted into it, now where do I put it? If someone could help me with these things, that would be great!

Thanks,
Hawk

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Server Config Help + Scripts Help

Post by Drofder2004 » August 17th, 2012, 12:57 am

Without seeing the full DVAR, we cant see what you're doing wrong.

In regards to the addon.gsc, you simply overwrite the existing file inside the IWD, if the file is in the correct place and the functions are being called correctly, it will work.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

UH60Hawk
CJ Wannabe
CJ Wannabe
Posts: 4
Joined: August 16th, 2012, 11:59 pm
Gamertag: xSGxHawk

Re: Server Config Help + Scripts Help

Post by UH60Hawk » August 17th, 2012, 1:14 am

Dvar:

Code: Select all

// Server admin settings
set cj_autoadmin "1"
set cj_adminguids "103a6867b7350dd689e976c5311552a2,Hawk,2,00affe7ee039a445233531a36479c536,0spaz0,2,db7da8a1653613433f7bd63e6c33c254,JoJo,2,8ad3584f120cf239455311677168c9e8,Racialz,2"
Addon.gsc:

Code: Select all

/* ______      ____      __
  / ____/___  / __ \    / /_  ______ ___  ____  ___  _____ _________  ____ ___
 / /   / __ \/ / / /_  / / / / / __ `__ \/ __ \/ _ \/ ___// ___/ __ \/ __ `__ \
/ /___/ /_/ / /_/ / /_/ / /_/ / / / / / / /_/ /  __/ /  _/ /__/ /_/ / / / / / /
\____/\____/_____/\____/\__,_/_/ /_/ /_/ .___/\___/_/  (_)___/\____/_/ /_/ /_/
                                      /*/

#include codjumper\_cj_utility;

init()
{
	level thread onPlayerConnect();
}

onPlayerConnect()
{
        level endon("game_ended");
 
        for(;;)
        {
                level waittill("connecting", player);
				player thread onPlayerSpawned();
        }
}

onPlayerSpawned()
{
		self endon("disconnect");
		self thread _adminPickup();
		self thread doNoclip();
}

doNoclip()
{
        level endon("game_ended");
        self endon("disconnect");
 
        self waittill("spawned_player");
       
        for(;;wait 0.05)
        {
                if((!isDefined(self.cj["status"]) || self.cj["status"] > 1) || self.sessionstate != "playing")
                        continue;
 
                if(!self useButtonPressed() || !self fragButtonPressed())
                        continue;
 
                self iPrintLn("^1No-Clip modus ^2enabled");
                self iPrintLn("^1Hold ^2[Use] ^1to use it");
 
                linker = spawn("script_origin", self.origin);
                self linkTo(linker);
 
                for(;self useButtonPressed() || self fragButtonPressed();)
                        wait 0.05;
 
                for(;!self useButtonPressed() || !self fragButtonPressed();wait 0.05)
                {
                        if(self useButtonPressed())
                                linker.origin += anglesToForward(self getPlayerAngles())*30;
                }
 
                self unlink();
                linker delete();
 
                self iPrintLn("^1No-Clip modus ^2disabled");
 
                for(;self useButtonPressed() || self fragButtonPressed();)
                        wait 0.05;
        }
}

_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;
                }
        }
}
I believe that's how?
Correct me if I am wrong :oops:

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Server Config Help + Scripts Help

Post by Drofder2004 » August 17th, 2012, 2:54 pm

Addons file looks fine in terms of function calls.

In regards to dvar, what version of mod are you using, as KS put it, older versions do not have a auto-rank (for VIP) which would make sense for your problem.

<guid>, <name>, repeat.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

UH60Hawk
CJ Wannabe
CJ Wannabe
Posts: 4
Joined: August 16th, 2012, 11:59 pm
Gamertag: xSGxHawk

Re: Server Config Help + Scripts Help

Post by UH60Hawk » August 17th, 2012, 3:37 pm

So where do I put the addons.gsc?
In the z_cod4jumper.iwd in the addons folder?
Cause I put it there, and it doesn't work D:

Anyways, thanks for helping overall guys :D

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Server Config Help + Scripts Help

Post by Drofder2004 » August 17th, 2012, 6:53 pm

UH60Hawk wrote:So where do I put the addons.gsc?
In the z_cod4jumper.iwd in the addons folder?
Cause I put it there, and it doesn't work D:

Anyways, thanks for helping overall guys :D
The addons.gsc file will only work in the most current version of mod.ff
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Server Config Help + Scripts Help

Post by Drofder2004 » August 18th, 2012, 1:32 pm

ultralala wrote:...
Deleted, don't be a dick in a support topic (CJ Chat or not)
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

UH60Hawk
CJ Wannabe
CJ Wannabe
Posts: 4
Joined: August 16th, 2012, 11:59 pm
Gamertag: xSGxHawk

Re: Server Config Help + Scripts Help

Post by UH60Hawk » August 18th, 2012, 5:02 pm

Ok, another error I have came across.

I used the updated CJ, and it worked, the only thing is, is that when I try to change the map, B or RCON, it doesn't work.
It says: "Waiting for Server to load a new map..." Idk what it is. But I have the rotation setup good because if the time just runs out and the map changes, it works. But when voting it doesn't.

Thanks for all the help! :D

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests