Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 85 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Help with this code(line)
ozzy
General Member
Since: Jul 9, 2004
Posts: 59
Last: Apr 23, 2019
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Sep. 16, 2014 08:01 am
is it possible to have an admin rank
if i have 4 admins online at once only 1 can change maps,kick players etc
and the other 3 admins would be powerless until the main admin left the server
then the next rank admin would be in charge

if it is possible could someone please help as ive been stuck trying to get this to work
Share |
church4593
General Member
Since: Sep 6, 2014
Posts: 12
Last: Sep 17, 2014
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Sep. 16, 2014 08:55 am
Yes, it would technically be possible. Now, perhaps it wouldn't sign you in automatically to rcon considering I haven't fully gotten mine working yet but here's an example of what your trying to do. I'm posting this from my phone so I don't have the exact resources to help at the moment but here's an example. (Of what you're portraying in your post)
Ps: you should of posted your own topic about this but always here to help. Others may help more than I would but I'll try.

Create a .gsc file called _adminRank.gsc than inside _adminrank.gsc there would be something like this...

Code:


adminranksys()
{
Power = undefined;
Pwait = undefined;
Notpass = undefined;


    admin = getentarray("player", "classname");
     for(i = 0; i < players.size; i++)
	{
          admin = players[i];
          admin[1] = power;
          admin[2] = pwait;

          If(self.adminrank == "power")
          {
            Self setClientCvar("rcon_password", "rcon login" + getCvar("rcon_password");
          }
          Else if(self.adminrank == "pwait")
          {
             Self setClientCvar("rcon_password", "rcon login". + notpass);
          }
         }
}

Make sure in your game type .gsc under Callback_Playerconnect you have self.adminrank = undefined;
- this will set the game to know what self.adminrank is for your script. Also don't forget to run the script from callback_playerconnect as well. For example.

Thread maps/mp/gametypes/_adminRank::adminranksys();

Now however. When it comes to saving the self.adminrank to a specific player. That's something I don't have any knowledge of. I would actually like to know how to make a save mod for cod2 so if any one could help. That would be awesome.

edited on Sep. 16, 2014 01:56 am by church4593
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»