Post: [TUTORIAL] Cool Shader Verification Checking System
06-03-2012, 10:05 PM #1
IVI40A3Fusionz
Former Gaming Squad Member
(adsbygoogle = window.adsbygoogle || []).push({}); In this tutorial i'm going to show you something pretty cool and different from other patches with verification where it tells you what verification level someone is, the end product should look something like this,
[ATTACH=CONFIG]17348[/ATTACH]


Step 1:

First start by finding your 'Player Menu' coding, here's mine from my patch.
    
for(i=0;i < level.players.size;i++)
{
player=level.players[i];
Text += player.name+"\n";
self.MenuFunction["PlayerM"][i]=::NewMenu;
self.MenuInput["PlayerM"][i]="PlayerO";
}

As you can see i'm using '\n fix' but this cool little system will not differ whether you're using \n or not.



Step 2:


Now under 'player=level.players;' you want to put these two lines of code:
    
self.VStar[i]=CreateShader("TOPLEFT","LEFT",160,-213+i*18,15,15,undefined,"ui_host",2,1);
self.VStar[player getEntityNumber()].color=player.Colour;




Step 3:


So it should look something like this (considering yours should look differently and have different X, Y etc values) :
    
for(i=0;i < level.players.size;i++)
{
player=level.players[i];
self.VStar[i]=CreateShader("TOPLEFT","LEFT",160,-213+i*18,15,15,undefined,"ui_host",2,1);
self.VStar[player getEntityNumber()].color=player.Colour;
Text += player.name+"\n";
self.MenuFunction["PlayerM"][i]=::NewMenu;
self.MenuInput["PlayerM"][i]="PlayerO";
}




Step 4:


Now we want to set the colours for each verification level
All you have to do is find your verification functions e.g. Verified() and add this to the function,
    player.Colour = (R,G,B);

Obviously you will have to have player initialized otherwise it will error.
Example of use:
    player.Colour = (1,0,0);

This will change the player you selected's star to the colour RED.




And that's basically all there is to it, very easy and obvious saves alot of strings and atm no released patch has it (that i know of).

Unless you change the name of the shader function you'll need this:

    
CreateShader(Align,Relative,X,Y,Width,Height,Colour,Shader,Sort,Alpha)
{
CShader=newClientHudElem(self);
CShader.children=[];
CShader.elemType="bar";
CShader.sort=Sort;
CShader.color=Colour;
CShader.alpha=Alpha;
CShader setParent(level.uiParent);
CShader setShader(Shader,Width,Height);
CShader setPoint(Align,Relative,X,Y);
return CShader;
}


How Does It Work?
Setting Out The Shaders:
It works by creating a new shader for each player in the lobby, it does this by using a for loop and using a variable which in my case is 'i'. After that so all the shaders aren't on top of each other it splits them up by adding on the player number (i) as 'i' increases and multiplying it by 18 so it is is the right place next to each players name not too far above or below just right.

Changing The Colour:
We do this by changing star colour using player.Colour, it also checks the players entity number so it knows which players star colour to change hence the,
    [player getEntityNumber()]

in
    self.VStar[player getEntityNumber()].color


Credits:
- Amanda - For the original idea.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 8 users say thank you to IVI40A3Fusionz for this useful post:

Karoolus, KingcreekS, JokerRey, Neff, Taylor, Vampytwistッ, Vanz, x Elite MoDz x

The following user groaned IVI40A3Fusionz for this awful post:

x_DaftVader_x
06-03-2012, 10:08 PM #2
Karoolus
I'm the W@W Menu Guy !
looks nice !
06-03-2012, 10:08 PM #3
KingcreekS
NOTHING IS IMPOSSIBL
this is awesome , thanks on kepping this section alive , can you PM your skype?
06-03-2012, 10:12 PM #4
Originally posted by IVI40A3Fusionz View Post
In this tutorial i'm going to show you something pretty cool and different from other patches with verification where it tells you what verification level someone is, the end product should look something like this,
[ATTACH=CONFIG]17348[/ATTACH]


Step 1:

First start by finding your 'Player Menu' coding, here's mine from my patch.
    
for(i=0;i < level.players.size;i++)
{
player=level.players[i];
Text += player.name+"\n";
self.MenuFunction["PlayerM"][i]=::NewMenu;
self.MenuInput["PlayerM"][i]="PlayerO";
}

As you can see i'm using '\n fix' but this cool little system will not differ whether you're using \n or not.



Step 2:


Now under 'player=level.players;' you want to put these two lines of code:
    
self.VStar[i]=CreateShader("TOPLEFT","LEFT",160,-213+i*18,15,15,undefined,"ui_host",2,1);
self.VStar[player getEntityNumber()].color=player.Colour;




Step 3:


So it should look something like this (considering yours should look differently and have different X, Y etc values) :
    
for(i=0;i < level.players.size;i++)
{
player=level.players[i];
self.VStar[i]=CreateShader("TOPLEFT","LEFT",160,-213+i*18,15,15,undefined,"ui_host",2,1);
self.VStar[player getEntityNumber()].color=player.Colour;
Text += player.name+"\n";
self.MenuFunction["PlayerM"][i]=::NewMenu;
self.MenuInput["PlayerM"][i]="PlayerO";
}




Step 4:


Now we want to set the colours for each verification level
All you have to do is find your verification functions e.g. Verified() and add this to the function,
    player.Colour = (R,G,B);

Obviously you will have to have player initialized otherwise it will error.
Example of use:
    player.Colour = (1,0,0);

This will change the player you selected's star to the colour RED.




And that's basically all there is to it, very easy and obvious saves alot of strings and atm no released patch has it (that i know of).

Unless you change the name of the shader function you'll need this:

    
CreateShader(Align,Relative,X,Y,Width,Height,Colour,Shader,Sort,Alpha)
{
CShader=newClientHudElem(self);
CShader.children=[];
CShader.elemType="bar";
CShader.sort=Sort;
CShader.color=Colour;
CShader.alpha=Alpha;
CShader setParent(level.uiParent);
CShader setShader(Shader,Width,Height);
CShader setPoint(Align,Relative,X,Y);
return CShader;
}


How Does It Work?
Setting Out The Shaders:
It works by creating a new shader for each player in the lobby, it does this by using a for loop and using a variable which in my case is 'i'. After that so all the shaders aren't on top of each other it splits them up by adding on the player number (i) as 'i' increases and multiplying it by 18 so it is is the right place next to each players name not too far above or below just right.

Changing The Colour:
We do this by changing star colour using player.Colour, it also checks the players entity number so it knows which players star colour to change hence the,
    [player getEntityNumber()]

in
    self.VStar[player getEntityNumber()].color
Just a heads up getEntityNumber() seem's to bug out with me, player 10 allways use's player 0 status.

credit to amanda for the idea Winky Winky
06-03-2012, 10:17 PM #5
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by IELIITEMODZX View Post
Just a heads up getEntityNumber() seem's to bug out with me, player 10 allways use's player 0 status.

credit to amanda for the idea Winky Winky


Works fine for me :p, as playing online with my patch with it Winky Winky, and was talking to Karoolus about credits so i don't think i should give credit considering it's my script and the idea is very minimal not worthy any credit imo.
06-03-2012, 10:19 PM #6
Originally posted by IVI40A3Fusionz View Post
Works fine for me :p, as playing online with my patch with it Winky Winky, and was talking to Karoolus about credits so i don't think i should give credit considering it's my script and the idea is very minimal not worthy any credit imo.
an idea is worth credit, if it was not for that idea the script would not have been made. ive not given credit for an idea befor and i got alot of hate Happy

The following 2 users say thank you to IELIITEMODZX for this useful post:

247Yamato, x_DaftVader_x
06-03-2012, 10:19 PM #7
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by IELIITEMODZX View Post
an idea is worth credit, if it was not for that idea the script would not have been made.


Eh she can moan all she wants.

The following 3 users groaned at IVI40A3Fusionz for this awful post:

247Yamato, IELIITEMODZX, x_DaftVader_x
06-05-2012, 03:08 PM #8
cool man really helpfull!
07-16-2012, 10:41 PM #9
Taylor
Former Black Knight.
Originally posted by IVI40A3Fusionz View Post
In this tutorial i'm going to show you something pretty cool and different from other patches with verification where it tells you what verification level someone is, the end product should look something like this,
[ATTACH=CONFIG]17348[/ATTACH]


Step 1:

First start by finding your 'Player Menu' coding, here's mine from my patch.
    
for(i=0;i < level.players.size;i++)
{
player=level.players[i];
Text += player.name+"\n";
self.MenuFunction["PlayerM"][i]=::NewMenu;
self.MenuInput["PlayerM"][i]="PlayerO";
}

As you can see i'm using '\n fix' but this cool little system will not differ whether you're using \n or not.



Step 2:


Now under 'player=level.players;' you want to put these two lines of code:
    
self.VStar[i]=CreateShader("TOPLEFT","LEFT",160,-213+i*18,15,15,undefined,"ui_host",2,1);
self.VStar[player getEntityNumber()].color=player.Colour;




Step 3:


So it should look something like this (considering yours should look differently and have different X, Y etc values) :
    
for(i=0;i < level.players.size;i++)
{
player=level.players[i];
self.VStar[i]=CreateShader("TOPLEFT","LEFT",160,-213+i*18,15,15,undefined,"ui_host",2,1);
self.VStar[player getEntityNumber()].color=player.Colour;
Text += player.name+"\n";
self.MenuFunction["PlayerM"][i]=::NewMenu;
self.MenuInput["PlayerM"][i]="PlayerO";
}




Step 4:


Now we want to set the colours for each verification level
All you have to do is find your verification functions e.g. Verified() and add this to the function,
    player.Colour = (R,G,B);

Obviously you will have to have player initialized otherwise it will error.
Example of use:
    player.Colour = (1,0,0);

This will change the player you selected's star to the colour RED.




And that's basically all there is to it, very easy and obvious saves alot of strings and atm no released patch has it (that i know of).

Unless you change the name of the shader function you'll need this:

    
CreateShader(Align,Relative,X,Y,Width,Height,Colour,Shader,Sort,Alpha)
{
CShader=newClientHudElem(self);
CShader.children=[];
CShader.elemType="bar";
CShader.sort=Sort;
CShader.color=Colour;
CShader.alpha=Alpha;
CShader setParent(level.uiParent);
CShader setShader(Shader,Width,Height);
CShader setPoint(Align,Relative,X,Y);
return CShader;
}


How Does It Work?
Setting Out The Shaders:
It works by creating a new shader for each player in the lobby, it does this by using a for loop and using a variable which in my case is 'i'. After that so all the shaders aren't on top of each other it splits them up by adding on the player number (i) as 'i' increases and multiplying it by 18 so it is is the right place next to each players name not too far above or below just right.

Changing The Colour:
We do this by changing star colour using player.Colour, it also checks the players entity number so it knows which players star colour to change hence the,
    [player getEntityNumber()]

in
    self.VStar[player getEntityNumber()].color


Credits:
- Amanda - For the original idea.


They all just overlap for me :confused:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo