Page 1 of 1
teleport spawn protection
Posted: Tue Dec 30, 2008 6:37 pm
by Tazz
hey again guys...i was wondering how to add spawn protection to a teleports....i have the htele workign fine but too many people are tele camping so trying to get some relief on this situation.....i tried to search for it but kept telling me nothing found and i thought i saw spawn protection on here before....either way here is my script for the teleport but i need to add protection for when u come out the other end
Code: Select all
teletrig:
local.smoke1 = spawn script_model model "static/corona_reg.tik"
local.smoke1 origin ( 1941 104 509 )
local.smoke1 light 1 1 1 35 // r g b radius
local.smoke1 scale 1
local.smoke1 notsolid
local.trig = spawn trigger_multiple
local.trig.origin = ( 1941 104 509 )
local.trig setsize ( -50 -50 -50 ) ( 50 50 50 )
local.trig targetname port
$port setthread teleport
end
teleport:
self waittill trigger
local.player = parm.other
local.player tele ( 5933 -2103 539 )
they only need to be protected for like 3-5 secs and thats it....just so they cant be killed coming right thru
thx for the help again guys
Tazz
Re: teleport spawn protection
Posted: Tue Dec 30, 2008 7:37 pm
by Aprop
Code: Select all
teletrig:
local.smoke1 = spawn script_model model "static/corona_reg.tik"
local.smoke1 origin ( 1941 104 509 )
local.smoke1 light 1 1 1 35 // r g b radius
local.smoke1 scale 1
local.smoke1 notsolid
local.smoke1 targetname big_smoke
local.trig = spawn trigger_multiple
local.trig.origin = ( 1941 104 509 )
local.trig setsize ( -50 -50 -50 ) ( 50 50 50 )
local.trig targetname port
$port setthread teleport
end
teleport:
self waittill trigger
local.player = parm.other
local.player tele ( 5933 -2103 539 )
$big_smoke remove
$port remove
wait 5
thread teletrig
end
if u want se smoke when tele off just delete remove and make other spawn thread for trigger.. or you can use triggerable, like heere
Code: Select all
teleport:
self waittill trigger
local.player = parm.other
local.player tele ( 5933 -2103 539 )
self nottriggerable
wait 5
self triggerable
Second's better, buy your choice.
Posted: Tue Dec 30, 2008 7:52 pm
by $oldier Of Ra
Aprop, your first script demolishes the trigger and the second one just turned the trigger off for 5 seconds... Telecamping means, some idiots are camping at the destination of a teletrigger.
I still wonder why people prefer thread and goto for loops, it causes the engine to continuously break and build new threads, Use a nice and healthy while statement instead besides you're using a setthread so the while statement, destroying your teletrigger and building it up again is completely pointless.
Code: Select all
teletrig:
local.smoke1 = spawn script_model model "static/corona_reg.tik"
local.smoke1 origin ( 1941 104 509 )
local.smoke1 light 1 1 1 35 // r g b radius
local.smoke1 scale 1
local.smoke1 notsolid
local.trig = spawn trigger_multiple
local.trig.origin = ( 1941 104 509 )
local.trig setsize ( -50 -50 -50 ) ( 50 50 50 )
local.trig targetname port
$port setthread teleport
end
teleport:
self waittill trigger
local.player = parm.other
local.player tele ( 5933 -2103 539 )
local.player nodamage
wait 3 //change how long you want the player to be protected
local.player takedamage
end
Cheers Tazz.
Posted: Wed Dec 31, 2008 12:10 am
by Tazz
thx sor ill try the local.player nodamage and see how that pans out....thats all i need is a few secs of protection....thx again
Posted: Sat Jan 10, 2009 11:44 am
by Aprop
$oldier Of Ra wrote:Aprop, your first script demolishes the trigger and the second one just turned the trigger off for 5 seconds... Telecamping means, some idiots are camping at the destination of a teletrigger.
My bad, sorry, I didnt understand what he want exacly... i never play on those funny childish servers with teleports and unlimited ammo... its ridiculous.
Posted: Sat Jan 10, 2009 12:42 pm
by $oldier Of Ra
Aprop wrote:
i never play on those funny childish servers with teleports and unlimited ammo... its ridiculous.
Amen, brother!!
