Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Kick player with Script in Trigger

  1. #1
    Staff Sergeant Heaney's Avatar
    Join Date
    Sep 16 2010
    Location
    Northern Ireland
    Posts
    214

    Question Kick player with Script in Trigger

    Wondering how I can make a script that will kick a player if they do something in a trigger's activation field?

    Do I use serverCommand? If so how?

  2. #2
    Code:
    serverCommand format ['#kick %1', name player];
    Generic and will need certain conditions if used in a trigger, not sure if it would even work in a trigger.

  3. #3
    Staff Sergeant Heaney's Avatar
    Join Date
    Sep 16 2010
    Location
    Northern Ireland
    Posts
    214
    Author of the Thread
    Yeah I'll put it in a script then, not trigger.

  4. #4
    Staff Sergeant Heaney's Avatar
    Join Date
    Sep 16 2010
    Location
    Northern Ireland
    Posts
    214
    Author of the Thread
    Code:
    serverCommand format ['#kick %1', name player];
    Isn't working (from an SQF).

    At all. Just won't work.

  5. #5
    Code:
    serverCommand format ["#kick %1", name player];
    If not working, then try this

    Code:
    serverCommand format ["#exec kick %1", name player];
    I had a typo in my last post, It also may only work on a server.

  6. #6

  7. #7
    Staff Sergeant Heaney's Avatar
    Join Date
    Sep 16 2010
    Location
    Northern Ireland
    Posts
    214
    Author of the Thread
    Yeah I made a solution that just gives that client endGame.

  8. #8
    Quote Originally Posted by Heaney View Post
    Yeah I made a solution that just gives that client endGame.
    Any chance you could explain that solution in more detail? Thanks!

  9. #9
    Probably this http://community.bistudio.com/wiki/forceEnd

    And then just specify what you want the trigger to check. E.g
    condition: (rating player < -1000)
    on act: forceEnd

    Edit: or this http://community.bistudio.com/wiki/endMission
    Or this http://community.bistudio.com/wiki/failMission

  10. #10
    Quote Originally Posted by cuel View Post
    Probably this http://community.bistudio.com/wiki/forceEnd

    And then just specify what you want the trigger to check. E.g
    condition: (rating player < -1000)
    on act: forceEnd

    Edit: or this http://community.bistudio.com/wiki/endMission
    Or this http://community.bistudio.com/wiki/failMission
    Apologies, but I had found those in my initial search... maybe I'm misunderstanding how the triggers work then. Wouldn't a trigger set up as you describe end the mission for all players when any one player's rating fell below -1000? I don't see any of those three functions taking any parameters (a player object, for example). Is the trigger system somehow aware that the forceEnd only applies to the player that tripped the condition?

Page 1 of 2 12 LastLast

Similar Threads

  1. Execute script on player from trigger
    By eLectryx in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 1
    Last Post: May 31 2012, 12:37
  2. If player in specific trigger area start a script in init.sqf
    By Wiggum in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 4
    Last Post: Jul 11 2010, 12:54
  3. Trigger to triger script on certain player
    By Kristian in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 6
    Last Post: Jun 22 2010, 10:50
  4. Time lapse script/trigger(need looping trigger)
    By Chocolate_thunder in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 8
    Last Post: Feb 2 2010, 17:58
  5. Kick player feature
    By chrismvts in forum ARMA 2 & OA - SUGGESTIONS
    Replies: 21
    Last Post: Jul 8 2009, 13:22

Posting Permissions

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