Hey Guys
I make now a sd mod.
and want make a anticampermod.
When you camp 20 sec or 15 sec.
You will be dead.
killtube can help me?
Hey Guys
I make now a sd mod.
and want make a anticampermod.
When you camp 20 sec or 15 sec.
You will be dead.
killtube can help me?
For standaloneCode:antiCamp() { self endon("killed_player"); count = 0; time = 15; for(;;) { origin = self.origin; wait 1; if(self.origin == origin) count++; else count = 0; if(count == time) self suicide(); } }
Code:init() { thread onPlayerConnect(); } onPlayerConnect() { level endon("intermission"); for(;;) { level waittill("connecting", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { self endon("disconnect"); level endon("intermission"); for(;;) { self waittill("spawned_player"); self thread antiCamp(); } }
Last edited by Mitch; 31st January 2013 at 20:57.
kung foo man (31st January 2013),STAUFFi (31st January 2013)
I don't got much time, i could answer tommorow.
But just work with self.campingPos = self.origin; and then check the distance within time.
No ... No ... this is not possible .......
Try adding this:
Code:antiCamp() { self endon("killed_player"); count = 0; time = 15; for(;;) { origin = self.origin; wait 1; if(self.origin == origin && self.sessionstate != "spectator") count++; else count = 0; if(count == time) self suicide(); } }
timescale 0.01
Weird, still same
Well if you credit, u can use mine. I never used it, but when i tested it, it worked.
Its longer but it kills camper that camps in a small area.
May you need to fix the campdistance.
If u want to enable the timer, delete the // at "self thread campHudTimer ....
Spoiler:
Download: Click Me
No ... No ... this is not possible .......
Killer.Pro (1st February 2013),kung foo man (1st February 2013)
Only an unimportant remark:
If the player has left, you dont destroy the camptimer hud and it will reserve space in the memory. (if i am right.. )
Maybe this script will work better
Code:antiCamp() { self endon("killed_player"); self endon("disconnect"); self notify("antiCamp"); self endon("antiCamp"); if(self.sessionstate != "playing") return; count = 0; time = 15; dmg = 5; for(;;) { origin = self.origin; wait 1; if(self.origin == origin && self.sessionstate == "playing") count++; else count = 0; if(count >= time) self thread [[level.callbackPlayerDamage]]( self, self, dmg , 1, "MOD_EXPLOSIVE", "none", self.origin, (0,0,0), "none", 0 ); } }
Last edited by Mitch; 1st February 2013 at 19:43.