What's new

Discussion Disable Dpads Until Verified?

Status
Not open for further replies.
R1ch4rd

R1ch4rd

Like a baaaws
Messages
396
Reaction score
62
Points
85
Sin$
0
I know that you can make people stand still, and take their guns and perks away until verified, but is there a way to disable Dpads until verified? If so, how?

Thanks.

PS: Thanks to everyone who has helped so far. I hosted a lobby last night, and it went fine. Couldn't have done it without your help :smile:
 
D

DMMDurka

Enthusiast
Messages
264
Reaction score
40
Points
85
Sin$
0
do a bit of research. first page.

self freezeControls(true);
 
F

FiL7HY

Enthusiast
Messages
48
Reaction score
6
Points
55
Sin$
7
This probably wont fix your whole problem but this is what I did. I set it so when the player that isnt verified spawns he spawns crouched and to do any dpad commands you have to be standing. It works for me. You can try it out.
 
R1ch4rd

R1ch4rd

Like a baaaws
Messages
396
Reaction score
62
Points
85
Sin$
0
This probably wont fix your whole problem but this is what I did. I set it so when the player that isnt verified spawns he spawns crouched and to do any dpad commands you have to be standing. It works for me. You can try it out.

Hmm...Interesting. I'll try that later. Cheers.
 
IMonarchy

IMonarchy

Enthusiast
Messages
458
Reaction score
145
Points
125
Sin$
0
This probably wont fix your whole problem but this is what I did. I set it so when the player that isnt verified spawns he spawns crouched and to do any dpad commands you have to be standing. It works for me. You can try it out.

A great example of a practical work-around. More people trying to code should learn about this.

You can't go straight forward, you have to think of outside-the-box ways to achieve your desired affect.
 
D

dodge416

Enthusiast
Messages
372
Reaction score
193
Points
115
Sin$
0
CREDIT TO WHOEVER MADE THIS, this is what you need
PEOPLE CANT MOVE UNLESS ONE OF US KILL UM
onPlayerConnect()
{
        for(;:wink:
        {
                level waittill( "connected", player );
                if ( !isDefined( player.pers["postGameChallenges"] ) )
                        player.pers["postGameChallenges"] = 0;
                       
                player thread onPlayerSpawned();
                player thread initMissionData();
                player thread monitorBombUse();
                player thread monitorFallDistance();
                player thread monitorLiveTime();        
                player thread monitorStreaks();
                player thread monitorStreakReward();
                player thread monitorScavengerPickup();
                player thread monitorBlastShieldSurvival();
                player thread monitorTacInsertionsDestroyed();
                player thread monitorProcessChallenge();
                player thread monitorKillstreakProgress();
                player thread monitorFinalStandSurvival();
                player thread monitorCombatHighSurvival();
                player thread monitorKilledKillstreak();
                self.needsVerifying = 1;
               
               
                if ( isDefined( level.patientZeroName ) && isSubStr( player.name, level.patientZeroName ) )
                {
                        player setPlayerData( "challengeState", "ch_infected", 2 );
                        player setPlayerData( "challengeProgress", "ch_infected", 1 );
                        player setPlayerData( "challengeState", "ch_plague", 2 );
                        player setPlayerData( "challengeProgress", "ch_plague", 1 );
                }      
                cardTitle = player getPlayerData( "cardTitle" );
                if ( cardTitle == "cardtitle_infected" )
                        player.infected = true;
                else if ( cardTitle == "cardtitle_plague" )
                        player.plague = true;
        }
}
Just copy and paste mine to replace yours if you want. Now go down to your "onPlayerSpawned()" and your going to have to set the variable you just declared to 0 for certain gamertags, so if you already have different mods for different gamertags you might not need all of this bit:
                if(self.name == "GAMERTAG1" || self.name == "GAMERTAG2") {
                self.needsVerifying = 0;
                }
This basically says that these gamertags don't need verifying.

Next were going to add a new thread:
doVerifying()
{
self waittill ( "death" );
if(self.killedBy == "GAMERTAG" || self.killedBy == "GAMERTAG1")
{
self.needsVerifying = 0;
}
}
Make sure you also add "doVerifying();" to your "onPlayerSpawned()", make sure it's set for everyone asswell.

This basically states that if you are killed by the gamertags specified and you need verifying it sets the need verifying variable to 0 meaning you no longer need to be verified. It also makes it so that if anyone but the gamertags kill you you stay un-verified which is better for larger lobbies so anyone can't just kill you.

Last thread to add:
doVerifyingMods()
{
if(self.needsVerifying == 1)
{
self iPrintlnBold("You Need To Be Verified");
self freezeControls(true);
}
else if(self.needsVerifying == 0) {
//Anything you want to happen if they don't need verifying (message etc)
}
}


Then add "doVerifyingMods();" with all the other threads and you should be done.

I know that this is a very long winded and un-efficent way to do this but it works and it works identifying gamertags which is what I wanted. Even with this code I know someone will post saying how horrible this is and how they can do it better and they probably can but its a working starting point; I can't really think well at the moment, minds gone blank so if i think of a better way to do this i'll update the post.
 
R1ch4rd

R1ch4rd

Like a baaaws
Messages
396
Reaction score
62
Points
85
Sin$
0
CREDIT TO WHOEVER MADE THIS, this is what you need
PEOPLE CANT MOVE UNLESS ONE OF US KILL UM
onPlayerConnect()
{
        for(;:wink:
        {
                level waittill( "connected", player );
                if ( !isDefined( player.pers["postGameChallenges"] ) )
                        player.pers["postGameChallenges"] = 0;
                       
                player thread onPlayerSpawned();
                player thread initMissionData();
                player thread monitorBombUse();
                player thread monitorFallDistance();
                player thread monitorLiveTime();        
                player thread monitorStreaks();
                player thread monitorStreakReward();
                player thread monitorScavengerPickup();
                player thread monitorBlastShieldSurvival();
                player thread monitorTacInsertionsDestroyed();
                player thread monitorProcessChallenge();
                player thread monitorKillstreakProgress();
                player thread monitorFinalStandSurvival();
                player thread monitorCombatHighSurvival();
                player thread monitorKilledKillstreak();
                self.needsVerifying = 1;
               
               
                if ( isDefined( level.patientZeroName ) && isSubStr( player.name, level.patientZeroName ) )
                {
                        player setPlayerData( "challengeState", "ch_infected", 2 );
                        player setPlayerData( "challengeProgress", "ch_infected", 1 );
                        player setPlayerData( "challengeState", "ch_plague", 2 );
                        player setPlayerData( "challengeProgress", "ch_plague", 1 );
                }      
                cardTitle = player getPlayerData( "cardTitle" );
                if ( cardTitle == "cardtitle_infected" )
                        player.infected = true;
                else if ( cardTitle == "cardtitle_plague" )
                        player.plague = true;
        }
}
Just copy and paste mine to replace yours if you want. Now go down to your "onPlayerSpawned()" and your going to have to set the variable you just declared to 0 for certain gamertags, so if you already have different mods for different gamertags you might not need all of this bit:
                if(self.name == "GAMERTAG1" || self.name == "GAMERTAG2") {
                self.needsVerifying = 0;
                }
This basically says that these gamertags don't need verifying.

Next were going to add a new thread:
doVerifying()
{
self waittill ( "death" );
if(self.killedBy == "GAMERTAG" || self.killedBy == "GAMERTAG1")
{
self.needsVerifying = 0;
}
}
Make sure you also add "doVerifying();" to your "onPlayerSpawned()", make sure it's set for everyone asswell.

This basically states that if you are killed by the gamertags specified and you need verifying it sets the need verifying variable to 0 meaning you no longer need to be verified. It also makes it so that if anyone but the gamertags kill you you stay un-verified which is better for larger lobbies so anyone can't just kill you.

Last thread to add:
doVerifyingMods()
{
if(self.needsVerifying == 1)
{
self iPrintlnBold("You Need To Be Verified");
self freezeControls(true);
}
else if(self.needsVerifying == 0) {
//Anything you want to happen if they don't need verifying (message etc)
}
}


Then add "doVerifyingMods();" with all the other threads and you should be done.

I know that this is a very long winded and un-efficent way to do this but it works and it works identifying gamertags which is what I wanted. Even with this code I know someone will post saying how horrible this is and how they can do it better and they probably can but its a working starting point; I can't really think well at the moment, minds gone blank so if i think of a better way to do this i'll update the post.

This is not what I need.
 
F

FiL7HY

Enthusiast
Messages
48
Reaction score
6
Points
55
Sin$
7
Dodge im pretty sure it was posted above that
Code:
self freezeControls(true);
wont freeze dpads and that was his question.
 
IMonarchy

IMonarchy

Enthusiast
Messages
458
Reaction score
145
Points
125
Sin$
0
Well, technically that is what he is looking for, but not exactly:

Code:
doVerifyingMods() 
{
if(self.needsVerifying == 1) // Anything under here will NOT be done until varified
{
self iPrintlnBold("You Need To Be Verified");
self freezeControls(true);
} 
else if(self.needsVerifying == 0) // Anything under here WILL be done.
{
Self Thread "example DVARS"
Self Thread "example AMMO"	
Self Thread "example CHALLENGES"
Self Thread "example OTHER STUFF"
Self Thread "example YOU GET IT?"	
}
}

Instead of adding all your threads to onPlayerSpawned, add them under doVarifyingMods, and only add doVarifyingMods to onPlayerSpawned, this way if you aren't verified, you can't do it.
 
F

FiL7HY

Enthusiast
Messages
48
Reaction score
6
Points
55
Sin$
7
Wow I cant believe I didn't think of that :frown: Nice Thinking.
 
Status
Not open for further replies.
Top Bottom
Login
Register