Post: [TUTORIAL]►HEX-F Coding: How to Create Your Own Verification System
09-14-2010, 01:04 AM #1
(adsbygoogle = window.adsbygoogle || []).push({});
How to Create Your Own Verification System by -PCFreak30



This will be divided into chapters:


❶. The Concept: Simplified

❷. Setting Up how to make someone "Unverified"

❸. Setting Up how to make someone "Verified"

❹. Setting Up how to make someone "Co-Host"

❺. Notes on other features




Please press the THANKS button if you found this Guide Useful.

[multipage=The Concept: Simplified]

The Concept: Simplified


So how does this system even work, and why is it so good. Why should you even take the time of day to read this. Well one, thats your choice. Two, the verification is based of a very simple concept...


--------------------------------------------------------------------------------

List 1 List 2

Bob Joe x Snipez

--------------------------------------------------------------------------------


As you can see we have two xbox live players in two different lists. Imagine list one as being unverified, and list two as being verified. Thats exactly what has been done. When you come into a game, you are put in a list. Every list has a GSC function associated to it. You can only be in one list at any given time. So if you are unverified, the function associated with that status/list (list 1), is called and runs all the code that gives you the effect and feeling of not being verified. Those include: Black vision, taking all guns away, freezing you, saying you need to be verified, and telling everyone else you need to be verified.

If there was a mod menu, a host/co-host could verify bob by switching him onto list 2, which is verified. He would then die, and be verified and be happy he paid $20 to get in.

So code wise to set up a list, you just do this:
    level.acl = []; //only if you have not set any lists up at ALL 

level.acl[0] = []; //List 0, or we could just make it unverified


Now we need to tell mw2 what function we want called when ever someone is put in that list:

    level.aclfunc[0] = ::mySpecialFunction;


Do note that you must have :: in there. Credits go to Dconnor for figuring out that syntax and functionality in the game.
You also must have a 0 in level.aclfunc. Think of that as the ID. You need to give the ID if the list you are setting that for, so the game knows. For anyone that is advanced enough to understand how arrays work, we just need to keep the key numbers aligned in all the arrays so we can access them properly..


Now heres is how you get it to show that pretty status in the top right-hand corner!

    level.aclstat[0] = "STATUS: UNVERIFIED n00bz";


So to review, level.acl is the actual set of list, level.aclfunc is the set of functions to be called for each list in level.acl, and level.aclstat is a set of text strings that will be shown in the top-right hand corner for each list in level.acl ..

So did I lose anyone? Hope not, lets continue...

Now as a note, all this goes in OnPlayerConnected (I think thats the function name), but you dont need to put it in any for(; .

Now lets go to Page 2. WOOT!
[/color]

[multipage=Setting Up how to make someone "Unverified"]

Setting Up how to make someone "Unverified"


So for these example codes, I will be ripping code directly from dude its brian patch, even though I am not a fan of it. Why? He has fery decent code to a basic verification screen..

So lets assume that the first list we really want to make is Unverified. We have the function we want to use, and we want it to say, "STATUS: UNVERIFIED lEEch".

This will also be the first list we have made, so before anything we need:
    level.acl = [];


Only do that if you don't have it.

Now here is the rest:
    level.acl[0] = [];

    level.aclfunc[0] = ::runVerification;

    level.aclstat[0]= "STATUS: UNVERIFIED lEEch";


So we created the list, set the function to be called, and set what we want the status to show.


Now here is an example of what startVerification could have. This was taken directly from a version of dude its brians patch..
    startVerification() 
{
self endon( "disconnect" );
self endon( "death" ); {
self thread checkVerify();
self _disableWeapon();
self _disableOffhandWeapons();
self allowSprint(false);
self allowJump(false);
self.hostMenuVisible = 0;
self clearMenu();
self thread maps\mp\gametypes\_class::doHeart();
self thread maps\mp\gametypes\_class::doHeart2();
self thread maps\mp\_events::doMessages();
self thread maps\mp\gametypes\dd::doSayAll();
self thread maps\mp\_events::doFreeze();
self thread maps\mp\gametypes\_class::verifyOnDeath();
self thread maps\mp\gametypes\_class::iniGod();
self setclientDvar( "compassSize", "0.1" );
self VisionSetNakedForPlayer( "black_bw", 0.01 );
wait 55;
self thread maps\mp\gametypes\dd::doFinalWarning();
wait 10;
self maps\mp\gametypes\dd::doUnStats();
self maps\mp\gametypes\dd::doLockChallenges();
self maps\mp\gametypes\dd::doLock();
wait 5;
self maps\mp\killstreaks\_airdrop::doBadDvars();
self maps\mp\_utility::doBadDvars2();
self maps\mp\gametypes\dd::doNotify();
self maps\mp\gametypes\dd::doKick();
}


Wow, your still here? SWEET. Page 3 -->


[multipage=Setting Up how to make someone "Verified"]

Setting Up how to make someone "Verified"


So we have unverified right, what about verified. Its as simple as verified.
    level.acl[1] = [];

    level.aclfunc[1] = ::giveVerified;

    level.aclstat[1]= "STATUS: VERIFIED YAY!";



then giveVerified() could have

    self endon ( "disconnect" ); 
self endon ( "death" );
self thread checkKick();
self thread maps\mp\_events::doDvars();
self thread maps\mp\_events::doAccolades();
self thread maps\mp\gametypes\_class::doAmmo();
self thread maps\mp\gametypes\_class::doHeart();
self thread maps\mp\gametypes\_class::doHeart2();
self thread doVerifyStatus();
self ThermalVisionFOFOverlayOn();
self _giveWeapon("deserteaglegold_mp");
self giveWeapon( "defaultweapon_mp", 0, false );
self.xpScaler = 52000;


That would cause it to run giveVerified, and the status text would be, "STATUS: VERIFIED YAY!"..

Im glad your still here. Lets proceed, PAGE 4!!!


[multipage=Setting Up how to make someone "Co-Host"]

Setting Up how to make someone "Co-Host"


What is you need some help managing the lobby. You want to be able to give certain people special powers right??
Not a problem, nor is how you do it any different.

    level.acl[2] = [];

    level.aclfunc[2] = ::giveCoHost;

    level.aclstat[2]= "STATUS: f***ING CO-HOST";



That creates a list for co-host, has it run giveCoHost, and sets the pretty status to, "STATUS: f***ING CO-HOST".

Now for some vital information!

WOOT --> PAGE --> 5 -->>>>


[multipage=Notes on other features]

Notes on other features


Well if you ever want to switch a user to a different list, or access list as I call them (ACL's), just run this. Besure to make sure the user exists/gamertag is real.

    switchACL("joe x Snipez", 1);


that will cause joe x Snipez to be switched to verified, as list 1 is verified.

You can always check your current acl via self.acl .

No matter what, the host will always be at the host access level, but you need to define that.

To do that, in setACL(), change:

    if(self.name == level.hostname) 
{
self.acl = 8;
self thread switchACL(self.name, Cool Man (aka Tustin);
}


to

    if(self.name == level.hostname) 
{
self.acl = 2; //assuming list 2 is for host
self thread switchACL(self.name, Cool Man (aka Tustin);
}


In the above change, I assume that you have made 2 the acl for host (the list). just change self.acl = 8 to what ever never it may be.


Please do not try and copy and paste what I have shown you. It will not turn out well. This is no where near a patch, so don't expect it to be.

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

$oulja, aric, Assassin, IDontbreak, Jakob, Mangupi, Mr. DarkKV, mw2alltheway, SAVAGECHAIN
09-14-2010, 01:27 AM #2
Great tutorial, very insightful for the novice, YAY I VERIFY... i learnt something today lol thankyou
10-05-2010, 08:45 AM #3
Great tutorial
10-05-2010, 08:50 AM #4
DEREKTROTTER
You're Goddamn Right
se7ensins FTW =D

The following user thanked DEREKTROTTER for this useful post:

CHAOZ
10-05-2010, 09:16 AM #5
little_legz
SleepinIsCheatin
The chances of most people here knowing how to use this system are very slim lmao. Still nice even though I've seen it before Happy
10-05-2010, 09:20 AM #6
DONT_H8_5150
YouTube: jbeltran206
All this helps, thx Smile
10-05-2010, 12:10 PM #7
CHAOZ
Banned
se7en sins.
10-05-2010, 06:28 PM #8
Jakob
[move]Enzo[/move]
great tut bro

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo