Results 1 to 8 of 8

Thread: I will not teleport ?

  1. #1
    Private ElEmEnT's Avatar
    Join Date
    Aug 2013
    Posts
    22
    Thanks
    9
    Thanked 0 Times in 0 Posts

    I will not teleport ?

    Hey KillTube-Community,

    I use this script. Yesterday the script work, but
    at the moment i will not teleport.
    When i press F nothing happen.


    Code:
    main
    {
    	entteleport1 = getentarray("teleport1","targetname");
      if(isdefined(entteleport1))
      {
        for(lp=0;lp<entteleport1.size;lp=lp+1)
          entteleport1[lp] thread teleport1();
      }
    }
    
    teleport1()
    {
      while(true)
      {
       self waittill("trigger",other);
       entTarget = getent(self.target, "targetname");
       other setorigin(entTarget.origin);
       other setplayerangles(entTarget.angles);
       wait(0.10);
      }
    }
    }
    Thanks

    ElEmEnT

  2. #2
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    Write "main()" instead of "main", also at the and you seem to have useless bracket "}"

  3. The Following 2 Users Say Thank You to EvoloZz For This Useful Post:

    kung foo man (26th October 2013),Loveboy (26th October 2013)

  4. #3
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    And if it still doesn't work, look again on the entries and in your script

  5. #4
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    (Cut off the line where entTarget is declared and paste out of the cycle. It's not error, only optimisation.)

  6. #5
    Private ElEmEnT's Avatar
    Join Date
    Aug 2013
    Posts
    22
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Nothing work, I tried everything you said. Now my Script looks so :
    Code:
    main()
    {
    
      entteleport1 = getentarray("teleport1","targetname");
      if(isdefined(entteleport1))
      {
        for(lp=0;lp<entteleport1.size;lp=lp+1)
          entteleport1[lp] thread teleport1();
      }
      
      entteleport2 = getentarray("teleport2","targetname");
      if(isdefined(entteleport2))
      {
        for(lp=0;lp<entteleport2.size;lp=lp+1)
          entteleport2[lp] thread teleport2();
      }
    
    
    }
    
    teleport1()
    {
      while(true)
      {
       self waittill("trigger",other);
       entTarget = getent(self.target, "targetname");
       other setorigin(entTarget.origin);
       other setplayerangles(entTarget.angles);
       wait(0.10);
      }
    }
    
    teleport2()
    {
      while(true)
      {
       self waittill("trigger",other);
       entTarget = getent(self.target, "targetname");
       other setorigin(entTarget.origin);
       other setplayerangles(entTarget.angles);
       wait(0.10);
      }
    }

  7. #6
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    Btw you called this gsc from your mp_map.gsc?

  8. #7
    Private ElEmEnT's Avatar
    Join Date
    Aug 2013
    Posts
    22
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Yes I called this gsc from my Map

  9. #8
    Private ElEmEnT's Avatar
    Join Date
    Aug 2013
    Posts
    22
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Thanks for help, I got it !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •