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
10-07-2012, 05:44 PM #11
forflah123
Who’s Jim Erased?
Originally posted by ENT View Post
What makes this different from other verifications?


it half works

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo