FLScanner

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

FLScanner

Postby Alex » Tue Aug 22, 06 12:47 pm

This is a script I made quite a while ago.
I even released it: http://www.dxalpha.com/forum/viewtopic.php?t=6239

Code: Select all
//=============================================================================
// FLScanner.  (C) Alpha // www.dxalpha.com
//=============================================================================
class FLScanner extends DeusExDecoration config (FunLine);

var config  string Name[50];
var config  string IP[50];

function Frob(Actor Frobber, Inventory frobWith)
{
   local int i;
   local bool bAccepted;
   local DeusExPlayer Player;
   local string PlayerIP;
   Player = DeusExPlayer(Frobber);
   PlayerIP = Player.GetPlayerNetworkAddress();
   PlayerIP=left(PlayerIP,instr(PlayerIP,":"));
   bAccepted = False;
   for (i=0; i < 50; i++)
   {
      if(Name[i] ~= Player.PlayerReplicationInfo.PlayerName)
      {
         if(IP[i] ~= PlayerIP)
         {
            bAccepted = True;
         }
      }
   }
   if(bAccepted == True)
   {
      Player.ClientMessage("|P3Access Granted...");
      Super.Frob(Frobber, frobWith);
   }
   else if(bAccepted == False)
   {
      Player.ClientMessage("|P2Access Denied!");
   }
}

defaultproperties
{
     bInvincible=True
     ItemName="Retinal Scanner"
     bPushable=False
     Physics=PHYS_None
     Mesh=LodMesh'DeusExDeco.RetinalScanner'
     AmbientSound=Sound'DeusExSounds.Generic.SecurityL'
     CollisionRadius=10.000000
     CollisionHeight=11.430000
     Mass=10.000000
     Buoyancy=40.000000
}


And in the FunLine.ini you had to add this:

Code: Select all
[FLScannerV1.FLScanner]
Name[0]=~[A]lex~
Name[1]=~S[A]tel~
Name[2]=~[A]Mr.X~
IP[0]=192.168.2.1
IP[1]=192.168.2.1
IP[2]=192.168.2.1


Now, I will explain what this thing does.
In the .ini, I have a combination of my name, ~[A]lex~, and my local IP.
When I'm on my own server, my IP is my local IP ;)
So, when I frob (Right Click) the FLScanner, it looks in FunLine.ini if there is a combination of my name & IP, if that is true, it sets bAccepted to true.
I don't add the Frob() & ClientMessage in the for(), in case someone's name & IP is in the ini multiple times.

Code: Select all
   PlayerIP = Player.GetPlayerNetworkAddress();
   PlayerIP=left(PlayerIP,instr(PlayerIP,":"));

About this, the first line gets your IP, but then it is in this format: IP:Port,
the second line selects everything that is before the :, so it selects the IP, and leaves out the : and the Port.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby ~Hit[CG]man~ » Wed Aug 23, 06 1:32 am

nice mod i seen something similar like in flibs securekeypad you die if you touch the keypad if you are'nt the right person lol
~Hit[CG]man~
Newbie
 
Posts: 18
Joined: Mon Mar 13, 06 3:40 am

Postby Max » Tue Oct 09, 07 5:33 am

Alex in the bottom of the read me for the mod it says

Updates in future:
//===================================================================
// Adding a wildcard.
//===================================================================

is there any hope in heting this or was it given up on ?
Making a custom Game Type
creating an RPG Game
User avatar
Max
Poster
 
Posts: 176
Joined: Thu May 24, 07 9:54 am

Postby Alex » Tue Oct 09, 07 7:58 am

I'm afraid I wont make that... Perhaps I will some day when I have the motivation to.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Max » Tue Oct 09, 07 8:35 am

thats ok
Making a custom Game Type
creating an RPG Game
User avatar
Max
Poster
 
Posts: 176
Joined: Thu May 24, 07 9:54 am


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 1 guest
cron