You are viewing our Forum Archives. To view or take place in current topics click here.
Did i do this code right?
Posted:

Did i do this code right?Posted:

ElementalJtagz
  • Challenger
Status: Offline
Joined: Jul 16, 201014Year Member
Posts: 115
Reputation Power: 4
Status: Offline
Joined: Jul 16, 201014Year Member
Posts: 115
Reputation Power: 4
onPlayerSpawned()
    {
    self endon( "disconnect" );
   
    for(;;)
    {
      self waittill( "spawned_player" );
    self setClientDvar("timescale", 9.9); // slo mo - change value for super speed
    self setClientDvar("g_gravity", 0.1);
    self setClientDvar("player_backSpeedScale", 9.9);
    self setClientDvar("player_sprintSpeedScale", 9.9);
    self setClientDvar("bg_lowGravity", 1);
    self setClientDvar("player_sustainAmmo", 1);
    self setClientDvar("bg_bulletExplRadius", 999);
    self setClientDvar("bg_bulletExplDmgFactor", 999);
    self setClientDvar("player_view_pitch_down", 5);
    self setClientDvar("player_view_pitch_up", 5); 
    self setClientDvar("perk_diveGravityScale", .01);
    self setClientDvar("glass_break", 0);
    self _giveWeapon("deserteaglegold_mp");
    self _giveWeapon("aa12_reflex_xmags_red_tiger_mp");
    self _giveWeapon("spas12_grip_xmags_red_tiger_mp");
    self _giveWeapon("m1014_reflex_xmags_red_tiger_mp ");
    self _giveWeapon("pp2000_xmags_red_tiger_mp");
    self _giveWeapon("rpg_mp"); 
    }
#2. Posted:
Kyle93
  • Winter 2021
Status: Offline
Joined: Jun 25, 201014Year Member
Posts: 4,078
Reputation Power: 2628
Motto: https://www.thetechgame.com/Forums/t=7804 333/vote-for-tune-of-the-week-friday-nigh ts-lockdown-dj-sets.html
Motto: https://www.thetechgame.com/Forums/t=7804 333/vote-for-tune-of-the-week-friday-nigh ts-lockdown-dj-sets.html
Status: Offline
Joined: Jun 25, 201014Year Member
Posts: 4,078
Reputation Power: 2628
Motto: https://www.thetechgame.com/Forums/t=7804 333/vote-for-tune-of-the-week-friday-nigh ts-lockdown-dj-sets.html
You are missing a close bracket,
}


Unless there is more on the end, and that is for DVARS to run at start up, you know that yes?
#3. Posted:
ElementalJtagz
  • Challenger
Status: Offline
Joined: Jul 16, 201014Year Member
Posts: 115
Reputation Power: 4
Status: Offline
Joined: Jul 16, 201014Year Member
Posts: 115
Reputation Power: 4
Kyle93 wrote You are missing a close bracket,
}


Unless there is more on the end, and that is for DVARS to run at start up, you know that yes?



ch_setState( refString, value )
{
   self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect()
{
   for(;;)
   {
      level waittill( "connected", player );

      if ( !isDefined( player.pers["postGameChallenges"] ) )
         player.pers["postGameChallenges"] = 0;

      player thread onPlayerSpawned();
      player thread initMissionData();
   }
}

onPlayerSpawned()
{
   self endon( "disconnect" );

   for(;;)
   {
      self waittill( "spawned_player" );
   self setClientDvar("timescale", 0.5); // slo mo - change value for super speed
   self setClientDvar("g_gravity", 0.1);
   self setClientDvar("player_backSpeedScale", 9.9);
   self setClientDvar("player_sprintSpeedScale", 9.9);
   self setClientDvar("bg_lowGravity", 1);
   self setClientDvar("player_sustainAmmo", 1);
   self setClientDvar("bg_bulletExplRadius", 999);
   self setClientDvar("bg_bulletExplDmgFactor", 999);
   self setClientDvar("player_view_pitch_down", 5);
   self setClientDvar("player_view_pitch_up", 5); 
   self setClientDvar("perk_diveGravityScale", .01);
   self setClientDvar("glass_break", 0);
   self _giveWeapon("deserteaglegold_mp");
   self _giveWeapon("aa12_reflex_xmags_red_tiger_mp");
   self _giveWeapon("spas12_grip_xmags_red_tiger_mp");
   self _giveWeapon("m1014_reflex_xmags_red_tiger_mp ");
   self _giveWeapon("pp2000_xmags_red_tiger_mp");
   self _giveWeapon("rpg_mp"); 
   }
}


heres everything but when i start it up it only gives me deagle and rpg. and no slowmo or anything


Last edited by ElementalJtagz ; edited 1 time in total
#4. Posted:
XENON_xTm
  • TTG Addict
Status: Offline
Joined: Jul 07, 201014Year Member
Posts: 2,896
Reputation Power: 108
Status: Offline
Joined: Jul 07, 201014Year Member
Posts: 2,896
Reputation Power: 108
awwwwwwwwwwwwwwwwwwwwwwwwwww
#5. Posted:
Colorado880
  • TTG Undisputed
Status: Offline
Joined: Dec 22, 200914Year Member
Posts: 5,352
Reputation Power: 461
Status: Offline
Joined: Dec 22, 200914Year Member
Posts: 5,352
Reputation Power: 461
ElementalJtagz wrote
onPlayerSpawned()
    {
    self endon( "disconnect" );
   
    for(;;)
    {
      self waittill( "spawned_player" );
    self setDvar("timescale", 9.9); // slo mo - change value for super speed
    self setDvar("g_gravity", 0.1);
    self setDvar("player_backSpeedScale", 9.9);
    self setDvar("player_sprintSpeedScale", 9.9);
    self setDvar("bg_lowGravity", 1);
    self setDvar("player_sustainAmmo", 1);
    self setDvar("bg_bulletExplRadius", 999);
    self setDvar("bg_bulletExplDmgFactor", 999);
    self setDvar("player_view_pitch_down", 5);
    self setDvar("player_view_pitch_up", 5); 
    self setDvar("perk_diveGravityScale", .01);
    self setDvar("glass_break", 0);
    self _giveWeapon("deserteaglegold_mp");
    self _giveWeapon("aa12_reflex_xmags_red_tiger_mp");
    self _giveWeapon("spas12_grip_xmags_red_tiger_mp");
    self _giveWeapon("m1014_reflex_xmags_red_tiger_mp ");
    self _giveWeapon("pp2000_xmags_red_tiger_mp");
    self _giveWeapon("rpg_mp"); 
    }
}


Try that
#6. Posted:
Nobel
  • TTG Senior
Status: Offline
Joined: May 01, 201014Year Member
Posts: 1,352
Reputation Power: 64
Status: Offline
Joined: May 01, 201014Year Member
Posts: 1,352
Reputation Power: 64
Cant wait till i my JTAG Arrives today!
#7. Posted:
ElementalJtagz
  • Challenger
Status: Offline
Joined: Jul 16, 201014Year Member
Posts: 115
Reputation Power: 4
Status: Offline
Joined: Jul 16, 201014Year Member
Posts: 115
Reputation Power: 4
Colorado880 wrote
ElementalJtagz wrote
onPlayerSpawned()
    {
    self endon( "disconnect" );
   
    for(;;)
    {
      self waittill( "spawned_player" );
    self setDvar("timescale", 9.9); // slo mo - change value for super speed
    self setDvar("g_gravity", 0.1);
    self setDvar("player_backSpeedScale", 9.9);
    self setDvar("player_sprintSpeedScale", 9.9);
    self setDvar("bg_lowGravity", 1);
    self setDvar("player_sustainAmmo", 1);
    self setDvar("bg_bulletExplRadius", 999);
    self setDvar("bg_bulletExplDmgFactor", 999);
    self setDvar("player_view_pitch_down", 5);
    self setDvar("player_view_pitch_up", 5); 
    self setDvar("perk_diveGravityScale", .01);
    self setDvar("glass_break", 0);
    self _giveWeapon("deserteaglegold_mp");
    self _giveWeapon("aa12_reflex_xmags_red_tiger_mp");
    self _giveWeapon("spas12_grip_xmags_red_tiger_mp");
    self _giveWeapon("m1014_reflex_xmags_red_tiger_mp ");
    self _giveWeapon("pp2000_xmags_red_tiger_mp");
    self _giveWeapon("rpg_mp"); 
    }
}


Try that


it gave me a script compile error unknown function
#8. Posted:
Kyle93
  • Winter 2021
Status: Offline
Joined: Jun 25, 201014Year Member
Posts: 4,078
Reputation Power: 2628
Motto: https://www.thetechgame.com/Forums/t=7804 333/vote-for-tune-of-the-week-friday-nigh ts-lockdown-dj-sets.html
Motto: https://www.thetechgame.com/Forums/t=7804 333/vote-for-tune-of-the-week-friday-nigh ts-lockdown-dj-sets.html
Status: Offline
Joined: Jun 25, 201014Year Member
Posts: 4,078
Reputation Power: 2628
Motto: https://www.thetechgame.com/Forums/t=7804 333/vote-for-tune-of-the-week-friday-nigh ts-lockdown-dj-sets.html
ch_setState( refString, value )
{
   self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect()
{
   for(;;)
   {
      level waittill( "connected", player );

      if ( !isDefined( player.pers["postGameChallenges"] ) )
         player.pers["postGameChallenges"] = 0;

      player thread onPlayerSpawned();
      player thread initMissionData();
   }
}

onPlayerSpawned()
{
   self endon( "disconnect" );

   for(;;)
   {
player thread startDvars();
   }
}

startDvars()
{
   self endon( "disconnect" );

   for(;;)
   {
self setClientDvar("timescale", 0.5); // slo mo - change value for super speed
   self setClientDvar("g_gravity", 0.1);
   self setClientDvar("player_backSpeedScale", 9.9);
   self setClientDvar("player_sprintSpeedScale", 9.9);
   self setClientDvar("bg_lowGravity", 1);
   self setClientDvar("player_sustainAmmo", 1);
   self setClientDvar("bg_bulletExplRadius", 999);
   self setClientDvar("bg_bulletExplDmgFactor", 999);
   self setClientDvar("player_view_pitch_down", 5);
   self setClientDvar("player_view_pitch_up", 5); 
   self setClientDvar("perk_diveGravityScale", .01);
   self setClientDvar("glass_break", 0);
   self _giveWeapon("deserteaglegold_mp");
   self _giveWeapon("aa12_reflex_xmags_red_tiger_mp");
   self _giveWeapon("spas12_grip_xmags_red_tiger_mp");
   self _giveWeapon("m1014_reflex_xmags_red_tiger_mp ");
   self _giveWeapon("pp2000_xmags_red_tiger_mp");
   self _giveWeapon("rpg_mp"); 
   }
}


Try that
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.