New Scripting Project
Moderator: Moderators
not joining/leaving server. I mean that spot... there wouldnt be much point if they figured out that all they have to do is stay for like 18 secs move for 2 out of the perimeter then they can go back in for 18 more. I want it to track them for long enough so its like, they've been in area for 18 secs and the tracker is set for 60 seconds. So if they come back in that area within 60 (or might i say 42 because of the already 18 seconds they have been in) then it will kill them once they have been back in for 2 more seconds. That way they cant just leave, come back, then their time starts over.
it's very complicated - but it could be done. you want to tally info on players that pass an area on the map and may return to it later. Well this requires that you track players joining the server and leaving the server so you can keep your array info in order. If you dont you may end up killing the wrong guy if another leaves the server.
See what im saying ? its very complicated, maybe someone will write it for you.
Or, maybe set your time limit to 5 seconds so its not worth staying there. or Elgan has an anti camper script you could use in Admin Pro I believe.
See what im saying ? its very complicated, maybe someone will write it for you.
Or, maybe set your time limit to 5 seconds so its not worth staying there. or Elgan has an anti camper script you could use in Admin Pro I believe.
death water
This old script might help. It is a trigger that slowly kills the player.
Code: Select all
//*************************************************************************************************************
//*** death_water script
//*** modifed version of the MOHAA minefield
//*** modifed by Duncan Weir May 2002
//*** The player enters the water, and within 15 secs
//*** if he's still in the water he'll start to drown.
//
//*** This main thread is called by this script and should not be called by the
//*** level script itsself. The level script should call deathwater_setup
//*** syntax ------------------------------------
//*** deathwater <this>
// script_object -> trigger multiple
// targetname = deathwater
// #startdrowntime = set to number of seconds a player can be in the water before drowning starts // default 10
// #timetodrown = set to number of seconds a player takes to drown // default 10
//*************************************************************************************************************
deathwater local.index:
thread debugtext ("THREAD: deathwater = " + local.index)
if ($deathwater[local.index].startdrowntime == NIL)
local.startdrowntime = 10
else
local.startdrowntime = $deathwater[local.index].startdrowntime
if ($deathwater[local.index].timetodrown == NIL)
local.timetodrown = 10
else
local.timetodrown = $deathwater[local.index].timetodrown
local.radius = 40 // radius of the damage - only in local player area
thread debugtext (" Radius = " + local.radius)
local.damage = 100 / local.timetodrown // calculate how much damage per second
thread debugtext (" Damage = " + local.damage)
deathwater_loop:
thread debugtext "THREAD: deathwater_loop"
$deathwater[local.index] waittill trigger // wait till this field is triggered
local.sucker = parm.other // gets the player info
thread debugtext " deathwater triggered"
thread debugtext (" local.sucker = " + local.sucker)
wait ( local.startdrowntime ) // wait a set amount of time before starting to drown
deathwater_drown_loop:
if (local.sucker istouching $deathwater[local.index] == 1) // check player is still in the deathwater
{
thread debugtext " Player is drowning"
// local.spawn_drown = (local.sucker.targetname + "_drown")
// spawn animate/fx_mortar_water targetname local.spawn_mine
// local.spawn_drown = $(local.sucker.targetname + "_drown")
// local.spawn_drown.origin = local.sucker.origin
// local.spawn_drown anim start
// local.spawn_drown playsound grenade_exp_water
radiusdamage local.sucker.origin local.damage local.radius
wait 1 // wait 1 second
// local.spawn_drown remove //*** remove the effect
goto deathwater_drown_loop // go back and see if player is still drowning
}
goto deathwater_loop
thread debugtext ("END THREAD: deathwater = " + local.index)
end
//*************************************************
//*** setup the deathwater(s)
//*** the level scripts should call this thread
//*************************************************
deathwater_setup:
thread debugtext "THREAD: deathwater_setup"
if ($deathwater == NULL)
{
thread debugtext " There is no deathwater in the map!!!"
local.deathwaters = 0
goto deathwater_setup_end
}
else
local.deathwaters = $deathwater.size
thread debugtext (" There are " + local.deathwaters + " deathwaters in this map")
for (local.i = 1 ; local.i <= $deathwater.size ; local.i ++)
{
thread deathwater local.i
}
deathwater_setup_end:
thread debugtext "END THREAD: deathwater_setup"
end
// text only output if debug mode is turned on
debugtext local.text:
if (level.debug == 1)
println local.text
end-
SplitMeister
- Private
- Posts: 7
- Joined: Tue Nov 21, 2006 4:15 pm
anticamp
As far as i can see, isn't this about anti-camping?
If so, then why not use an anti-campermod?
It's also in a mod called "adminpro"
And there is a stand alone version of it:
http://www.tsb-clan.nl/zzz_no_camping.pk3
Here you go, uploaded it to our domain
Greetz
If so, then why not use an anti-campermod?
It's also in a mod called "adminpro"
And there is a stand alone version of it:
http://www.tsb-clan.nl/zzz_no_camping.pk3
Here you go, uploaded it to our domain
Greetz
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:


