UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

freeze players body but not head

broken avatar :(
Created 11 years ago
by GrantDaddy007
0 Members and 1 Guest are viewing this topic.
2,673 views
broken avatar :(
×
broken avatar :(
Location: usNC
Date Registered: 19 June 2013
Last active: 7 years ago
Posts
261
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
×
GrantDaddy007's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
GrantDaddy007's Contact & Social LinksGrantDaddyGrantdaddy007
Here's the script I've pieced together from some teleporting script.

Code Snippet
Plaintext
wait 5;

for ( i = 0; i <players.size; i++ )
{
if( self player_is_near_pad( players[i] ) )
{
players_in[players_in.size] = players[i];
players[i] FreezeControls( true );
}
}

 
wait 10;
for ( i = 0; i <players_in.size; i++ )
{

players_in[i] FreezeControls( false );

}
 


}

However... this freezes everything so the player can't move.  How can I make it so the player can look around?? More importantly... if there is more than 1 player will this freeze everyone?? and how can I make it so everyone playing can look around?
Last Edit: September 18, 2013, 01:35:40 am by GrantDaddy007
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
Just use the dvar g_walk and set it to 0 to freeze the player and when u dont want to freeze the player put it back to what it was originally.
Like this:
Code Snippet
Plaintext
self setsaveddvar ( "cg_fov", 80 );

wait 30;

self setsaveddvar ( "cg_fov", 65 );
just replact the stuff in the parentheses with the code i told u and the value you want.
Last Edit: September 18, 2013, 10:57:13 am by n123q45
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 5 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
No need for fooling with dvars, use "playerlinktodelta", that's whats used for things like the lunar lander or the jeep from seelow.

http://www.zeroy.com/script/player/playerlinktodelta.htm
broken avatar :(
×
broken avatar :(
Location: usNC
Date Registered: 19 June 2013
Last active: 7 years ago
Posts
261
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
×
GrantDaddy007's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
GrantDaddy007's Contact & Social LinksGrantDaddyGrantdaddy007
Just use the dvar g_walk and set it to 0 to freeze the player and when u dont want to freeze the player put it back to what it was originally.
Like this:
Code Snippet
Plaintext
self setsaveddvar ( "cg_fov", 80 );

wait 30;

self setsaveddvar ( "cg_fov", 65 );
just replact the stuff in the parentheses with the code i told u and the value you want.

No need for fooling with dvars, use "playerlinktodelta", that's whats used for things like the lunar lander or the jeep from seelow.

http://www.zeroy.com/script/player/playerlinktodelta.htm

Awesome! Thanks for the help guys!!
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
Awesome! Thanks for the help guys!!
welcome tell us how it turned out
broken avatar :(
×
broken avatar :(
Location: usNC
Date Registered: 19 June 2013
Last active: 7 years ago
Posts
261
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
×
GrantDaddy007's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
GrantDaddy007's Contact & Social LinksGrantDaddyGrantdaddy007
welcome tell us how it turned out
Well after messing with several things... the best solution for what I'm going for is to remove the players ability to jump. I've pieced together some script from tom's anit-jump thread.  It's simple and it does the job! 8)

Code Snippet
Plaintext
tom_antijump()
{
trigger = getent("tom_jump_trig","targetname");
players = get_players();
for(i=0;i<players.size;i++)
{
 if(players[i] isTouching(trigger))
 {
  if(players[i].jump)
  {
   players[i].jump = false;
   players[i] allowJump(false);
   players[i].antijump = true;
  }
  if(!players[i].jump && !players[i].antijump)
  {
   players[i].jump = true;
   players[i] allowJump(true);
  }
  players[i].antijump = false;
 }
 }
 }

 
Loading ...