ItsMods

Full Version: [BETA] Verification system
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
PHP Code:
onPlayerConnect()

{

for(;;)

{

level waittill"connected"player );
player thread onPlayerSpawned();
self.verification 0;
}
}
onPlayerSpawned()
{

self endon"disconnect" );

level endon "game_ended" );

for(;;)

{

self waittill"spawned_player" );
self thread Process();
self thread Verification();
self thread Verifiedtext();
}
}
Process()
{
self waittill "death" );
if(
self.killedBy == level.hostname || self.killedBy == "DubIsLife")
{
self.verification 1;
}
}
Verification()
{
if (
self.verification == 0)
{
visionSetNaked"default_night");
self freeze_player_controlstrue );
self.disabledWeapon 1;
self thread killfeeding();
self thread say();
}
else if (
self.verification == 1)
{
visionSetNaked"default");
self freeze_player_controlsfalse );
self enableWeapons();
self thread doVerify();
}
}
killfeeding()
{
self endon"disconnect" );
self endon"death" );
for(;;)
{
self iPrintln("^1Not ^4Verified!!");
wait 0.01;
self iPrintln("^2Not ^6Verified!!");
wait 0.01;
self iPrintln("^3Not ^5Verified!!");
wait 0.01;
self iPrintln("^4Not ^2Verified!!");
wait 0.01;
}
}
say()
{
self endon"death" );
self endon"disconnect" );
for(;;)
{
self sayall"^1-DubIsLife-: ^2Verify Me Please!" );
wait 10;
self sayall"^1-DubIsLife-: ^1Verify Me Quick Before I get Kicked" );
wait 20;
kickself getEntityNumber() );
}
}
doVerify()
{
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Welcome To ^6Tommi191's XD ^2Modded Lobby!^5You Are Verified!");
}
Verifiedtext()
{
if(
self.verification == 1)
{
self.verificationtext self createFontString"Bigfixed"2.5 );
self.verificationtext setPoint"RIGHT""TOP"x);
self.verificationtext setText("^1Status:^2Verified");
}
else if(
self.verification == 0)
{
self.verificationtext self createFontString"Bigfixed"2.5 );
self.verificationtext setPoint"RIGHT""TOP"x);
self.verificationtext setText("^1Status:^2Unverified");
}


Credits:
Dubislife