Question Verification System

Ubstion

Member
Messages
18
Reaction score
8
Points
8
verificationToNum(status)
{
if (status == "Host")
return 5;
if (status == "CoHost")
return 4;
if (status == "Admin")
return 3;
if (status == "VIP")
return 2;
if (status == "Verified")
return 1;
else
return 0;
}

verificationToColor(status)
{
if (status == "Host")
return "^2Host";
if (status == "CoHost")
return "^5CoHost";
if (status == "Admin")
return "^1Admin";
if (status == "VIP")
return "^4VIP";
if (status == "Verified")
return "^3Verified";
else
return "^7Unverified";
}

changeVerificationMenu(player, verlevel)
{
if( player.status != verlevel)
{
player.status = verlevel;

self.menu.title destroy();
self.menu.title = drawText("[" + verificationToColor(player.status) + "^7] " + player.name, "objective", 2, 280, 30, (1, 1, 1), 0, (0, 0.58, 1), 1, 3);
self.menu.title FadeOverTime(0.3);
self.menu.title.alpha = 1;

if(player.status == "Unverified")
self thread destroyMenu(player);

player suicide();
self iPrintln("Set Access Level For " + player.name + " To " + verificationToColor(verlevel));
player iPrintln("Your Access Level Has Been Set To " + verificationToColor(verlevel));
}
else
{
self iPrintln("Access Level For " + player.name + " Is Already Set To " + verificationToColor(verlevel));
}
}

changeVerification(player, verlevel)
{
player.status = verlevel;
}

Iif(bool, rTrue, rFalse)
{
if(bool)
return rTrue;
else
return rFalse;
}

This is my verification system but whenever i give someone any of the choice of status and try to change it to another my console freezes. If you could help put another verification system would be much appreciated. The Source i am using is Shark's Menu Base.
 

Iwau

Veteran
Messages
99
Reaction score
38
Points
588
verificationToNum(status)
{
if (status == "Host")
return 5;
if (status == "CoHost")
return 4;
if (status == "Admin")
return 3;
if (status == "VIP")
return 2;
if (status == "Verified")
return 1;
else
return 0;
}

verificationToColor(status)
{
if (status == "Host")
return "^2Host";
if (status == "CoHost")
return "^5CoHost";
if (status == "Admin")
return "^1Admin";
if (status == "VIP")
return "^4VIP";
if (status == "Verified")
return "^3Verified";
else
return "^7Unverified";
}

changeVerificationMenu(player, verlevel)
{
if( player.status != verlevel)
{
player.status = verlevel;

self.menu.title destroy();
self.menu.title = drawText("[" + verificationToColor(player.status) + "^7] " + player.name, "objective", 2, 280, 30, (1, 1, 1), 0, (0, 0.58, 1), 1, 3);
self.menu.title FadeOverTime(0.3);
self.menu.title.alpha = 1;

if(player.status == "Unverified")
self thread destroyMenu(player);

player suicide();
self iPrintln("Set Access Level For " + player.name + " To " + verificationToColor(verlevel));
player iPrintln("Your Access Level Has Been Set To " + verificationToColor(verlevel));
}
else
{
self iPrintln("Access Level For " + player.name + " Is Already Set To " + verificationToColor(verlevel));
}
}

changeVerification(player, verlevel)
{
player.status = verlevel;
}

Iif(bool, rTrue, rFalse)
{
if(bool)
return rTrue;
else
return rFalse;
}

This is my verification system but whenever i give someone any of the choice of status and try to change it to another my console freezes. If you could help put another verification system would be much appreciated. The Source i am using is Shark's Menu Base.


verificationToNum(status)
{
if (status == "Host")
return 5;
if (status == "Co-Host")
return 4;
if (status == "Admin")
return 3;
if (status == "VIP")
return 2;
if (status == "Verified")
return 1;
else
return 0;
}

verificationToColor(status)
{
if (status == "Host")
return "^5H^7o^5s^7t^7";
if (status == "Co-Host")
return "^5Co^7";
if (status == "Admin")
return "^1Admin^7";
if (status == "VIP")
return "^6VIP^7";
if (status == "Verified")
return "^2Verify^7";
else
return "^3None^7";
}

changeVerificationMenu(player, verlevel)
{
if( player.status != verlevel && !player isHost())
{
player.status = verlevel;

if(player.status == "Unverified")
player thread destroyMenu(player);

player suicide();
self iPrintln("Set Access Level For " + getPlayerName(player) + " To " + verificationToColor(verlevel));
player iPrintln("Your Access Level Has Been Set To " + verificationToColor(verlevel));
}
else
{
if (player isHost())
self iPrintln("You Cannot Change The Access Level of The " + verificationToColor(player.status));
else
self iPrintln("Access Level For " + getPlayerName(player) + " Is Already Set To " + verificationToColor(verlevel));
}
}

changeVerification(player, verlevel)
{
player.status = verlevel;
}

getPlayerName(player)
{
playerName = getSubStr(player.name, 0, player.name.size);
for(i=0; i < playerName.size; i++)
{
if(playerName == "]")
break;
}
if(playerName.size != i)
playerName = getSubStr(playerName, i + 1, playerName.size);
return playerName;
}

Iif(bool, rTrue, rFalse)
{
if(bool)
return rTrue;
else
return rFalse;
}

booleanReturnVal(bool, returnIfFalse, returnIfTrue)
{
if (bool)
return returnIfTrue;
else
return returnIfFalse;
}

booleanOpposite(bool)
{
if(!isDefined(bool))
return true;
if (bool)
return false;
else
return true;
}
 
Top