+ Reply to Thread
Results 1 to 6 of 6

Thread: e2 kill script and movement detector?

  1. #1
    Wire Noob Chaser The Wolf's Avatar
    Join Date
    Sep 2009
    Posts
    1

    Question e2 kill script and movement detector?

    How do i make a E2 script kill someone via function, not physics prop, i saw it befor but i dont know who did it.

    also, is there a movement detector script, i need it to output "<USERNAME> moved!" in a hint. ._.

  2. #2
    Wire Sofaking Officer Tibbles's Avatar
    Join Date
    Aug 2008
    Location
    Barnus Philbert Boulevard
    Posts
    867

    Default Re: e2 kill script and movement detector?

    Easy.

    The Kill script is a ULX function for Admins and such.

    As for movement, this is just a theory, but it will probably spam the hint.

    [highlight=e2]
    @inputs Target:entity
    interval(100)

    Pos = Targetos()

    if(changed(Pos)){
    print("Player " + Target:name() + " has moved!"
    }

    [/highlight]

    That will probably work.
    Last edited by TomyLobo; 09-25-2009 at 02:50 AM.

  3. #3
    Bug Buster TomyLobo's Avatar
    Join Date
    Feb 2009
    Posts
    2,796

    Default Re: e2 kill script and movement detector?

    you dont need those [] around Target, I edited them out
    otherwise it looks fine.
    "It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup

    L&#237;fi&#240; l&#230;&#240;ist l&#250;mskt &#225;fram

  4. #4
    Banned Nicolai1's Avatar
    Join Date
    Nov 2008
    Location
    Denmark.
    Posts
    1,251

    Default Re: e2 kill script and movement detector?

    Movement detector for all players would probably beeeee....

    [highlight=e2]
    @persist R:array N
    interval(findUpdateRate())

    findByType("player")
    R = findToArray()

    N = 0
    while (N < R:count()) {
    N++
    if (R[N, entity]:velocity():length() > 1) {
    print(R[N, entity]:name() + "has moved!")
    }
    }

    [/highlight]

    Untested, should probably work :3
    Last edited by Nicolai1; 09-25-2009 at 03:17 AM.

  5. #5
    Wire Noob Doridian's Avatar
    Join Date
    Feb 2008
    Posts
    19

    Default Re: e2 kill script and movement detector?

    E2 kill script, mh.
    The only possibility i know of is being admin and using:
    Code:
    concmd("ulx slay "+Player:name())
    (with "wire_expression2_concmd 1", of course)

  6. #6
    Wire Sofaking N00bDud3's Avatar
    Join Date
    Jul 2009
    Location
    Error: Unknown Location
    Posts
    1,252

    Default Re: e2 kill script and movement detector?

    Quote Originally Posted by Nicolai1 View Post
    Movement detector for all players would probably beeeee....

    [highlight=e2]
    @persist R:array N
    interval(findUpdateRate())

    findByType("player")
    R = findToArray()

    N = 0
    while (N < R:count()) {
    N++
    if (R[N, entity]:velocity():length() > 1) {
    print(R[N, entity]:name() + "has moved!")
    }
    }

    [/highlight]

    Untested, should probably work :3
    Or you could use a for() loop. Much easier for this.
    Code:
    @persist R:array
    interval(findUpdateRate())
    
    findByType("player")
    R = findToArray()
    
    for (N = 1, R:count()) {
        if (R[N, entity]:velocity():length() > 1) {
           print(R[N, entity]:name() + "has moved!")
        }
    }



+ Reply to Thread

Similar Threads

  1. Find all players and kill them :D
    By bobthe2lol in forum Expression 2 Discussion & Help
    Replies: 6
    Last Post: 08-29-2009, 04:25 PM
  2. Using force to kill
    By caramel in forum Expression 2 Discussion & Help
    Replies: 4
    Last Post: 06-23-2009, 07:29 PM
  3. Kill counter
    By Beastery in forum Ideas & Suggestions
    Replies: 4
    Last Post: 08-03-2008, 12:47 PM
  4. Hover Kill Bot
    By Aus_Karlos in forum Wiremod General Chat
    Replies: 3
    Last Post: 08-29-2007, 12:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots