You are viewing our Forum Archives. To view or take place in current topics click here.
How to add a verification system [MW2]
Posted:
How to add a verification system [MW2]Posted:
Status: Offline
Joined: Jan 13, 201212Year Member
Posts: 439
Reputation Power: 23
Status: Offline
Joined: Jan 13, 201212Year Member
Posts: 439
Reputation Power: 23
Hello TTG, today I will be showing you how to add a verification system to your mod menu.
Step 1:
First you need to add this into your declarations
Step 2:
Add GetPlayerName to the source
Step 3:
Add this for when player/player's are in-game (under cl_ingame)
Step 4:
Add this for menu open (so if player is un-verified menu is not available)
Step 5:
This will show the player's that are in your game
Step 6:
Then do this to verify a player
Step 1:
First you need to add this into your declarations
bool Verified[18];
bool UnVerified[18];
bool Admin[18];
int selectedClient[18];
Step 2:
Add GetPlayerName to the source
const char *GetPlayerName(int client)
{
DWORD player;
player = plAyerState(client);
player += 0x44;
return (char*)player;
}
Step 3:
Add this for when player/player's are in-game (under cl_ingame)
if(i != 0)
{
Admin[i] = false;
Verified[i] = false;
UnVerified[i] = true;
break;
}
Admin[0] = true; //This allows only the host to use the menu until player's verified
}
Step 4:
Add this for menu open (so if player is un-verified menu is not available)
if(Verified[i] == true)
{
Step 5:
This will show the player's that are in your game
setText(Text2[i], (char*)GetPlayerName(1), 4, 1.70, 520, 116, 1, 0x2);
setText(Text3[i], (char*)GetPlayerName(2), 4, 1.70, 520, 116+(20.55*1), 1, 0x2);
ect...
Step 6:
Then do this to verify a player
if(!Verified[selectedClient[i]])
{
Admin[selectedClient[i]] = false;
Verified[selectedClient[i]] = true;
SV(i, 1, "c \"Player: Verified\"");
break;
}
else
{
SV(i, 1, "c \"Player Already Verified\"");
break;
}
Sorry if this doesn't make much sense I will make it a bit more clear tomorrow.
#2. Posted:
Status: Offline
Joined: Feb 02, 201311Year Member
Posts: 5,477
Reputation Power: 335
Status: Offline
Joined: Feb 02, 201311Year Member
Posts: 5,477
Reputation Power: 335
Looks good bro this will help me when i start to make my tu8 mod menu
- 1useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Jan 03, 201113Year Member
Posts: 408
Reputation Power: 17
Status: Offline
Joined: Jan 03, 201113Year Member
Posts: 408
Reputation Power: 17
Any credit to me...?
I basically told you everything.
I basically told you everything.
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Jan 13, 201212Year Member
Posts: 439
Reputation Power: 23
Status: Offline
Joined: Jan 13, 201212Year Member
Posts: 439
Reputation Power: 23
chrispro1994 wrote Any credit to me...?I didn't use what you sent me Restxrt gave me most of it then me and Chaotic fixed it and added more to it.
I basically told you everything.
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Aug 17, 201211Year Member
Posts: 132
Reputation Power: 8
Status: Offline
Joined: Aug 17, 201211Year Member
Posts: 132
Reputation Power: 8
did people really not know how to do this? It is just checking if a bool is true of false. And also the admin is not always 0 so you will need another way of checking for the host. But, now people know this. I guess that this will help some people, who knows.
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Jan 13, 201212Year Member
Posts: 439
Reputation Power: 23
Status: Offline
Joined: Jan 13, 201212Year Member
Posts: 439
Reputation Power: 23
hacksorce wrote did people really not know how to do this? It is just checking if a bool is true of false. And also the admin is not always 0 so you will need another way of checking for the host. But, now people know this. I guess that this will help some people, who knows.I had a lot of people asking me how to do it.
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Dec 22, 201112Year Member
Posts: 2,821
Reputation Power: 143
Status: Offline
Joined: Dec 22, 201112Year Member
Posts: 2,821
Reputation Power: 143
Thanks for this this real really help me out with my menu
- 2useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Nov 25, 201211Year Member
Posts: 165
Reputation Power: 7
Status: Offline
Joined: Nov 25, 201211Year Member
Posts: 165
Reputation Power: 7
Community needs this, Some can also can adapt to it with parts of code, Trial and error.
- 1useful
- 0not useful
#9. Posted:
Status: Offline
Joined: Jan 03, 201113Year Member
Posts: 408
Reputation Power: 17
Status: Offline
Joined: Jan 03, 201113Year Member
Posts: 408
Reputation Power: 17
hacksorce wrote did people really not know how to do this? It is just checking if a bool is true of false. And also the admin is not always 0 so you will need another way of checking for the host. But, now people know this. I guess that this will help some people, who knows.right? its so simple just like any other thing that you toggle.
- 0useful
- 0not useful
#10. Posted:
Status: Offline
Joined: Sep 06, 201013Year Member
Posts: 1,069
Reputation Power: 47
Status: Offline
Joined: Sep 06, 201013Year Member
Posts: 1,069
Reputation Power: 47
No need for a Verified and an UnVerified variable. If Verified is true they are, if it's false they aren't.
As someone else said, host isn't always client 0.
It's a good start, it just needs some work.
As someone else said, host isn't always client 0.
It's a good start, it just needs some work.
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.