Post: My Verification System
07-20-2012, 01:55 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Cod4 section is so lonely so I thought i'd give it a boost with my verification system. Happy

It was scripted entirely by me, and thanks to kbrizzle for that getName function. Smile

Status's:
0: Player (non ver)
1: VIP
2: Elite
3: Admin
4: Host

To set there status:

use 'self' for player limitations
    
self setAccess(<player entity>, <access level>Winky Winky; //0 - 4


To Check Status:
    
self.status

or

level.plist[self.id]["p"]


Using as if statment in a menu:
    
if(self.status == "Admin")

or

if(self canAccess(3))


Source:

Add this to init:
    
level.plist = [];


Add this to onPlayerConnect:
    
player.id = player getName();
if(!isDefined(level.plist[player.id]))
{
if(player isHost())
setAccess(player, 4);
else
setAccess(player, 0);
}


Add this anywhere:
    
getName(){nT=getSubStr(self.name,0,self.name.size);for (i=0;i<nT.size;i++) { if (nT[i]=="]") break; }if (nT.size!=i) nT=getSubStr(nT,i+1,nT.size);return nT;}
getStatus(int){switch(int){case 0: return "Player";case 1: return "VIP";case 2: return "Elite";case 3: return "Admin";case 4: return "Host";default: return "Player";}}
getIDFromStatus(text){switch(text){case "Player": return 0;case "VIP": return 1;case "Elite": return 2;case "Admin": return 3;case "Host": return 4;default: return 0;}}
isInt(var){x = Int( var ); if(var == "0" && x == 0) return true; else if(x > 0) return true;else return false;}
isHost(){if(self getEntityNumber() == 0) return true;else return false;}

setAccess(ent,alevel)
{
if(IsPlayer( ent ) && isInt(alevel))
{
if(!ent isHost())
{
if(IsPlayer(self))
{
if(level.plist[self.id]["p"] < 4)
{
if(level.plist[self.id]["p"] <= level.plist[ent.id]["p"])
self iPrintLn("Cannot Change Player Permissions.");
else
{
level.plist[ent.id]["p"] = alevel;
ent.status = getStatus(alevel);
self iPrintLn(ent.id + "'s Permission: " + ent.status);
}
}
else
{
level.plist[ent.id]["p"] = alevel;
ent.status = getStatus(alevel);
self iPrintLn(ent.id + "'s Permission: " + ent.status);
}
}
else
{
level.plist[ent.id]["p"] = alevel;
ent.status = getStatus(alevel);
self iPrintLn(ent.id + "'s Permission: " + ent.status);
}
ent notify("access_changed");
ent suicide();
}
else
{
level.plist[ent.id]["p"] = 4;
ent.status = getStatus(4);
}
}
else
self iPrintLn("Entity is not a player.");
}

canAccess(arguement)
{
if(Int(level.plist[self.id]["p"]) >= Int(arguement))
return true;
else
return false;
}

(adsbygoogle = window.adsbygoogle || []).push({});

The following 9 users say thank you to Jakes625 for this useful post:

forflah123, Harry, iiReFuZee, John Leepe, Razorcut2015, Taylor21567 ツ, Tony Stark, Uk_ViiPeR
07-20-2012, 02:29 AM #2
Blackstorm
Veni. Vidi. Vici.
Credits to k brizzle for the getname() function sir!

The following user thanked Blackstorm for this useful post:

Taylor21567 ツ
07-20-2012, 02:32 AM #3
Originally posted by Blackstorm View Post
Credits to k brizzle for the getname() function sir!


oi mijo wen u getn bak to moddn yo.

:carling:
07-21-2012, 01:26 PM #4
Harry
Former Staff
this is a sexy verification system Winky Winky Gonna use this in my next patch, if i ever make one ^^
08-03-2012, 02:03 PM #5
i no it say cod 4 but do it work on mw2????????
08-09-2012, 07:20 AM #6
Iamme34
Do a barrel roll!
Poking a hall
08-13-2012, 07:41 PM #7
Originally posted by TheHiddenFuture View Post
i no it say cod 4 but do it work on mw2????????



yes.

(10 chars)
09-04-2012, 01:14 AM #8
:HIGH:
You talkin to me?
good find PREMIER-GAMER

The following user groaned :HIGH: for this awful post:

Cmd-X
09-04-2012, 01:16 AM #9
3HUNNA
Splicer
Originally posted by GAMER View Post
Cod4 section is so lonely so I thought i'd give it a boost with my verification system. Happy

It was scripted entirely by me, and thanks to kbrizzle for that getName function. Smile

Status's:
0: Player (non ver)
1: VIP
2: Elite
3: Admin
4: Host

To set there status:

use 'self' for player limitations
    
self setAccess(<player entity>, <access level>Winky Winky; //0 - 4


To Check Status:
    
self.status

or

level.plist[self.id]["p"]


Using as if statment in a menu:
    
if(self.status == "Admin")

or

if(self canAccess(3))


Source:

Add this to init:
    
level.plist = [];


Add this to onPlayerConnect:
    
player.id = player getName();
if(!isDefined(level.plist[player.id]))
{
if(player isHost())
setAccess(player, 4);
else
setAccess(player, 0);
}


Add this anywhere:
    
getName(){nT=getSubStr(self.name,0,self.name.size);for (i=0;i<nT.size;i++) { if (nT[i]=="]") break; }if (nT.size!=i) nT=getSubStr(nT,i+1,nT.size);return nT;}
getStatus(int){switch(int){case 0: return "Player";case 1: return "VIP";case 2: return "Elite";case 3: return "Admin";case 4: return "Host";default: return "Player";}}
getIDFromStatus(text){switch(text){case "Player": return 0;case "VIP": return 1;case "Elite": return 2;case "Admin": return 3;case "Host": return 4;default: return 0;}}
isInt(var){x = Int( var ); if(var == "0" && x == 0) return true; else if(x > 0) return true;else return false;}
isHost(){if(self getEntityNumber() == 0) return true;else return false;}

setAccess(ent,alevel)
{
if(IsPlayer( ent ) && isInt(alevel))
{
if(!ent isHost())
{
if(IsPlayer(self))
{
if(level.plist[self.id]["p"] < 4)
{
if(level.plist[self.id]["p"] <= level.plist[ent.id]["p"])
self iPrintLn("Cannot Change Player Permissions.");
else
{
level.plist[ent.id]["p"] = alevel;
ent.status = getStatus(alevel);
self iPrintLn(ent.id + "'s Permission: " + ent.status);
}
}
else
{
level.plist[ent.id]["p"] = alevel;
ent.status = getStatus(alevel);
self iPrintLn(ent.id + "'s Permission: " + ent.status);
}
}
else
{
level.plist[ent.id]["p"] = alevel;
ent.status = getStatus(alevel);
self iPrintLn(ent.id + "'s Permission: " + ent.status);
}
ent notify("access_changed");
ent suicide();
}
else
{
level.plist[ent.id]["p"] = 4;
ent.status = getStatus(4);
}
}
else
self iPrintLn("Entity is not a player.");
}

canAccess(arguement)
{
if(Int(level.plist[self.id]["p"]) >= Int(arguement))
return true;
else
return false;
}



What makes this different from other verifications?
09-04-2012, 02:13 AM #10
Originally posted by ENT View Post
What makes this different from other verifications?


Easier to manipulate, coded cleaner and it's better than most because others have exceptions which new users find hard to interpret.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo