Post: [Release] My Verification System.
10-05-2014, 10:31 PM #1
Taylor
Former Black Knight.
(adsbygoogle = window.adsbygoogle || []).push({});


Hello NextGenUpdate Members, I threw this verification together and I am probably not going to use it. Have fun with it and edit accordingly, implement it into your sources accordingly. Do as you want with it.

What separates my verification from others is that i store the status into a variable so if a player leaves and joins back they get auto-verified by the code. However, you can make this carry though out games by using setDvar which I did not incorporate. Between how fast the code performs, how organized the code is, and what you can later adapt into better things it is a good resource to utilize into your source.

Please before copy & pasting my code from the webpage link read all the comments in the code, and use it accordingly before replying that you freeze or it doesn't work.

You must login or register to view this content.

Thanks for reading!
- Taylor
Last edited by Taylor ; 01-15-2015 at 03:31 PM.

The following 24 users say thank you to Taylor for this useful post:

A Friend, Bigmoneyhustlin, Boliberrys, Sabotage, Exelo, Geo, HaX-Stylin, HiddenHour, iknownothing, ItsLollo1000, NotALegitPlayer, RTE, Script Kiddie, SyGnUs, Taylors Bish, Teenage Modz, TheSaltCracka, TheyCallMeBreed, Vanz, Vioku, xJessex, xKraveModz, xSuperLᴏbbies
10-07-2014, 08:00 PM #11
Bigmoneyhustlin
Can’t trickshot me!
will this verification system make menu run better or fix the clients not showing when there is 16 players?
my menu is still old school verification system and i like it but not sure how it affects how well menu runs...
10-07-2014, 10:27 PM #12
Chris
Former Staff
Great job Tay. Glad to see you working on more great things for GSC.
10-07-2014, 10:50 PM #13
SyGnUs
Give a F*** About Your Lifestyle
Originally posted by Bigmoneyhustlin View Post
will this verification system make menu run better or fix the clients not showing when there is 16 players?
my menu is still old school verification system and i like it but not sure how it affects how well menu runs...


Your better of using this one as it appears more stable then some other ones + will be better to use in the long run.. and it saves the state of verification if the player leaves, I have never seen that.

The following user thanked SyGnUs for this useful post:

Bigmoneyhustlin
10-08-2014, 08:13 PM #14
Taylor
Former Black Knight.
Originally posted by Bigmoneyhustlin View Post
will this verification system make menu run better or fix the clients not showing when there is 16 players?
my menu is still old school verification system and i like it but not sure how it affects how well menu runs...


The player menu is the base yourself. That is your code. My code won't fix that however.

The following user thanked Taylor for this useful post:

Bigmoneyhustlin
10-08-2014, 08:15 PM #15
nice Taylor :P
10-09-2014, 11:31 AM #16
Taylor
Former Black Knight.
Originally posted by xKraveModz View Post
nice Taylor :P


Thanks! Smile
11-05-2014, 07:32 PM #17
MiseryLegion
Do a barrel roll!
Originally posted by Taylor View Post


Hello NextGenUpdate Members, I threw this verification together and I am probably not going to use it. Have fun with it and edit accordingly, implement it into your sources accordingly. Do as you want with it.

What separates my verification from others is that i store the status into a variable so if a player leaves and joins back they get auto-verified by the code. However, you can make this carry though out games by using setDvar which I did not incorporate. Between how fast the code performs, how organized the code is, and what you can later adapt into better things it is a good resource to utilize into your source.

Please before copy & pasting my code from the webpage link read all the comments in the code, and use it accordingly before replying that you freeze or it doesn't work.

You must login or register to view this content.

Thanks for reading!
- Taylor


Just noticed that your site is down ;/
I looked into it and found the cached web page so here's the code from the original site.
Please remove this if you don't want it here :p
    #include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;

init()
{
level.clientid = 0;
level thread onPlayerConnect();
level.verified_players["Ver"] = [];
level.verified_players["VIP"] = [];
level.verified_players["Admin"] = [];
level.verified_players["Co-Host"] = [];
//The above is needed to store the player's verification levels in the current game.
}
/*
The rest is needed, I will add comments to parts of the code that you to NOT need necessarily.
As well as various comments explaing what things are and what they do.
*/
onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", client);

if(client getName() == "xYARDSALEx" || client isHost() || client getName() == "ITheFallenI")
client setStatus("Server", "Host"); //You call this function with the two arguemtns stating who the client is getting verified by and then the status they will recieve.
else
{
status = strTok("Ver;VIP;Admin;Co-Host", ";");

for(x = 0; x < status.size; x++)
client checkPerms(status[x]);
}

client thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
for(;Winky Winky
{
self waittill("spawned_player");

//Below is just a code example on how to check a verification level.
if(getAccessLevel() > 0)
entry();
}
}
getHostEntity()
{
for(i = 0; i < 18; i++)
{
player = level.players[i];
if(player isHost())
return i;
}
return 0;
}
checkPerms(status)
{
for(i = 0; i < level.verified_players[status].size; i++)
{
for(x = 0; x < level.players.size; x++)
{
player = level.players[x];
if(player getName() == level.verified_players[status][i])
player setStatus("Server", status);
else
player setStatus("Server", "Non");
}
}
}
setStatus(who_set, status)
{
host = level.players[getHostEntity()];
if(status != "Non")
{
index = level.verified_players[status].size;
level.verified_players[status][index] = getName();
self.is_allowed = true;

if(!isAlive(host))
host waittill("spawned_player");

host printf(getName()+"'s Status Was Changed To: "+status+"\nTheir Status Has Been Stored.");
}
else
{
self notify("menu_stop");
self.is_allowed = undefined;
for(i = 0; i < level.verified_players[status].size; i++)
{
for(x = 0; x < level.players.size; x++)
{
player = level.players[x];
if(player getName() == level.verified_players[status][i])
level.verified_players[status][i] = "";
}
}
}

if(!isAlive(self))
self waittill("spawned_player");

self.status = status;
printf("Status Set To: "+status);
who_set printf(self getName()+"'s Status Has Been Set To: "+status+"\n"+host getName()+" Has Been Notified Of This Action.");
host printf("^1WARNING: "+self getName()+" Was Set To "+status+" By "+who_set);
}
//This entry function is un-needed.
entry()
{
printf("Welcome, "+self getName()+"!");
}
printf(str)
{
colors = strTok("0;1;2;3;4;5;6", ";");
finalString = "";
randomColor = RandomInt(6);

for(i = 0; i < str.size; i++)
{
for(x = 0; x < colors.size; x++)
if(str[i] == "^" && str[i+1] == colors[x])
break;
else
finalString = str;
}

if(finalString != "")
self iPrintln("^"+randomColor+finalString);
else
self iPrintln(str);

}
//If you already have the getName function feel free to ignore this one.
getName()
{
tempName = getSubStr(self.name, 0, self.name.size);

for(i=0;i<tempName.size;i++)
{
if(tempName[i]=="]")
break;
}

if(tempName.size!=i)
tempName = getSubStr(tempName, i+1, tempName.size);

return tempName;
}
getAccessLevel()
{
switch(self.status)
{
case "Host":
return 5;
case "Co-Host":
return 4;
case "Admin":
return 3;
case "VIP":
return 2;
case "Ver":
return 1;
case "Non":
return 0;
}
}
11-05-2014, 09:07 PM #18
Taylor
Former Black Knight.
Originally posted by MiseryLegion View Post
Just noticed that your site is down ;/
I looked into it and found the cached web page so here's the code from the original site.
Please remove this if you don't want it here :p
    #include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;

init()
{
level.clientid = 0;
level thread onPlayerConnect();
level.verified_players["Ver"] = [];
level.verified_players["VIP"] = [];
level.verified_players["Admin"] = [];
level.verified_players["Co-Host"] = [];
//The above is needed to store the player's verification levels in the current game.
}
/*
The rest is needed, I will add comments to parts of the code that you to NOT need necessarily.
As well as various comments explaing what things are and what they do.
*/
onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", client);

if(client getName() == "xYARDSALEx" || client isHost() || client getName() == "ITheFallenI")
client setStatus("Server", "Host"); //You call this function with the two arguemtns stating who the client is getting verified by and then the status they will recieve.
else
{
status = strTok("Ver;VIP;Admin;Co-Host", ";");

for(x = 0; x < status.size; x++)
client checkPerms(status[x]);
}

client thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
for(;Winky Winky
{
self waittill("spawned_player");

//Below is just a code example on how to check a verification level.
if(getAccessLevel() > 0)
entry();
}
}
getHostEntity()
{
for(i = 0; i < 18; i++)
{
player = level.players[i];
if(player isHost())
return i;
}
return 0;
}
checkPerms(status)
{
for(i = 0; i < level.verified_players[status].size; i++)
{
for(x = 0; x < level.players.size; x++)
{
player = level.players[x];
if(player getName() == level.verified_players[status][i])
player setStatus("Server", status);
else
player setStatus("Server", "Non");
}
}
}
setStatus(who_set, status)
{
host = level.players[getHostEntity()];
if(status != "Non")
{
index = level.verified_players[status].size;
level.verified_players[status][index] = getName();
self.is_allowed = true;

if(!isAlive(host))
host waittill("spawned_player");

host printf(getName()+"'s Status Was Changed To: "+status+"\nTheir Status Has Been Stored.");
}
else
{
self notify("menu_stop");
self.is_allowed = undefined;
for(i = 0; i < level.verified_players[status].size; i++)
{
for(x = 0; x < level.players.size; x++)
{
player = level.players[x];
if(player getName() == level.verified_players[status][i])
level.verified_players[status][i] = "";
}
}
}

if(!isAlive(self))
self waittill("spawned_player");

self.status = status;
printf("Status Set To: "+status);
who_set printf(self getName()+"'s Status Has Been Set To: "+status+"\n"+host getName()+" Has Been Notified Of This Action.");
host printf("^1WARNING: "+self getName()+" Was Set To "+status+" By "+who_set);
}
//This entry function is un-needed.
entry()
{
printf("Welcome, "+self getName()+"!");
}
printf(str)
{
colors = strTok("0;1;2;3;4;5;6", ";");
finalString = "";
randomColor = RandomInt(6);

for(i = 0; i < str.size; i++)
{
for(x = 0; x < colors.size; x++)
if(str[i] == "^" && str[i+1] == colors[x])
break;
else
finalString = str;
}

if(finalString != "")
self iPrintln("^"+randomColor+finalString);
else
self iPrintln(str);

}
//If you already have the getName function feel free to ignore this one.
getName()
{
tempName = getSubStr(self.name, 0, self.name.size);

for(i=0;i<tempName.size;i++)
{
if(tempName[i]=="]")
break;
}

if(tempName.size!=i)
tempName = getSubStr(tempName, i+1, tempName.size);

return tempName;
}
getAccessLevel()
{
switch(self.status)
{
case "Host":
return 5;
case "Co-Host":
return 4;
case "Admin":
return 3;
case "VIP":
return 2;
case "Ver":
return 1;
case "Non":
return 0;
}
}


I will update it right now. I had to delete the contents on the server. :p I lost all my web development code :/ but yanno. Smile
11-06-2014, 10:56 AM #19
MiseryLegion
Do a barrel roll!
Good luck, love your work!! Happy <3
Originally posted by Taylor View Post
I will update it right now. I had to delete the contents on the server. :p I lost all my web development code :/ but yanno. Smile

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo