Is it possible to 'disconnect' a player using triggers?

Post your scripting questions / solutions here

Moderator: Moderators

Shortricci
Sergeant Major
Posts: 100
Joined: Tue Jun 03, 2003 6:51 pm
Location: Bolton, England, UK
Contact:

Is it possible to 'disconnect' a player using triggers?

Post by Shortricci »

Can you disconnect a player in your maps by use of triggers?

Like the trigger under the ladder, to stop landsharkers?

Thanks

- Shortricci :twisted:
- [V2]Shortricci :: www.v2.org.uk -
ImageImage
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Sure, but it involves scripting.

For example (I take it the trigger has key / value setthread / disconnect_player):

Code: Select all

disconnect_player:
  parm.other remove
end
Image
User avatar
The Jackal
Sergeant Major
Posts: 101
Joined: Wed May 07, 2003 10:09 am
Contact:

Post by The Jackal »

If you are gonna use a trigger for landsharking its gotta be a trigger_use. But I never got my triggers to work in Demo :cry:

I know I am doing something wrong, just to busy lately to try.

I wish someone would write me a nice lil trigger_multiple all to trigger a thread (for which I will specify the thread later).

If only someone would be so kinda to me.
Virus
Lance Corporal
Posts: 19
Joined: Wed Oct 01, 2003 2:42 am
Location: UK

Post by Virus »

The Jackal wrote:If you are gonna use a trigger for landsharking its gotta be a trigger_use. But I never got my triggers to work in Demo :cry:

I know I am doing something wrong, just to busy lately to try.

I wish someone would write me a nice lil trigger_multiple all to trigger a thread (for which I will specify the thread later).

If only someone would be so kinda to me.
Sure why not...

Code: Select all

local.switch = spawn trigger_multiple
local.switch origin ( -497.80 -786.89 136.19 )
local.switch setsize  (0 0 0) (128 128 128)
local.switch setthread mythread

mythread:
local.player = parm.other
local.player remove
end
im almost sure when the player walks through the trigger multiple, it will remove him from the server :lol: . The Setsize is the size of the trigger, And the origin is the coords of where you want the trigger to be spawned.
if you dont know how to get the coords, Go ingame, Join a team, Find the position of where you would like the trigger, Pull open the console with the ` button. Then type 'coord' without the ' ' . Enjoy :)
User avatar
The Jackal
Sergeant Major
Posts: 101
Joined: Wed May 07, 2003 10:09 am
Contact:

Post by The Jackal »

HEHEHE thanks. Just wanted to see who would be nice to me. :lol:
Virus
Lance Corporal
Posts: 19
Joined: Wed Oct 01, 2003 2:42 am
Location: UK

Post by Virus »

no problem. Im new here so i'll try and help people as much as i can.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Virus wrote:no problem. Im new here so i'll try and help people as much as i can.
Wow that is a very good attitude :) Very welcome to .map :D

Btw, are you the Virus I know or are you another Virus ;) ?
Image
Virus
Lance Corporal
Posts: 19
Joined: Wed Oct 01, 2003 2:42 am
Location: UK

Post by Virus »

I'am the one that you know :lol:.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Ok :), but still welcome ;).

I'll stop spamming now :oops:
Image
Virus
Lance Corporal
Posts: 19
Joined: Wed Oct 01, 2003 2:42 am
Location: UK

Post by Virus »

thx 8-) .. lol i just thought of another way to stop sharking. Instead of disconnecting the player. Just annoy him and make him leave.. i think the following might work in a trigger :wink:

annoy:
local.player = parm.other
local.player take all
local.player hurt 50
local.player hide
end

If that doesnt annoy him , Nothing will. :roll:
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

lol, nice tactics but that won't annoy them too much,

what'd be better would be... was gonna script it but ahhh it's not that important

spawn fx/dummy.tik targetname "assholes_light"
$assholes_light light 1 1 1 200
$assholes_light.origin = parm.other
$assholes_light bind parm.other
parm.other.light = 200
$assholes_light thread light_dim parm.other
parm.other physics_off
end

light_dim local.player:
if !(isalive local.player)
{end}
else
{wait .75
self light 1 1 1 local.player.light
local.player.light = local.player.light - 25
if(local.player.light > 0)
{goto light_dim local.player}
else
{local.player.light = 200
goto light_dim local.player}}
end

well by the time i was gonna explain it all i may as well of just scripted it :p
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

Or better yet...

parm.other stufftext "unbindall"
parm.other stufftext "quit"

Make his game quit out and disable all his controls! hahahahaha :twisted:
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Or:

parm.other stufftext "com_maxfps 5"

Make him buy a new pc :)
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Or:

parm.other irl_user disconnect "EXT_RIGHT_ARM"

Rips the players right arm out of its socket ( The real life player ). That should teach him...

( BTW: dont use the "EXT_HEAD", that will kill the real life player and leave you with a call from the CIA. Use the slap command insted if you really HAVE to target the "EXT_HEAD", like this: parm.other irl_user slap "EXT_HEAD" ).




:twisted:
Admin .MAP Forums
Image
Head above heels.
User avatar
The Jackal
Sergeant Major
Posts: 101
Joined: Wed May 07, 2003 10:09 am
Contact:

Post by The Jackal »

LOL Does that really work Bjarne? I have never seen anything of the sort before. That would just be too brutal. I bet they will be for you to stufftext QUIT on them. :lol:
Post Reply