Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help KillifBelow Not Working
#1
Sad 
Hey guys I need some help on this code here:
Code:
CreateKillIfBelow(z)
{
    level thread KillBelow(z);
}

KillBelow(z)
{
    for(;;)
    {
        foreach(player in level.players)
        {
            if(player.origin[2] < z){
                RadiusDamage(player.origin,100,999999,999999);
            }
            wait .1;
        }
        wait .15;
    }
}
And if I insert
Code:
    CreateKillIfBelow(1750);
into let's say Highrise it won't create the death barrier. Any help?
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#2
Looks fine to me, you don't need the CreateKillIfBelow by the way. Make sure you're calling the code under the context of the level and not any players.

Example:
Code:
init()
{
    level thread KillBelow(1750);
    // blah.
}
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#3
(10-29-2012, 05:40)master131 Wrote: Looks fine to me, you don't need the CreateKillIfBelow by the way. Make sure you're calling the code under the context of the level and not any players.

Example:
Code:
init()
{
    level thread KillBelow(1750);
    // blah.
}

Ah okay will give this a shot tomorrow.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#4
Are you sure you are below 1750? Try adding a 'player iprintln("I R BELOW");' before RadiusDamage and check if you can see the message.
[Image: azuw.jpg]
Reply

#5
Try that:

PHP Code:
boundary_trigger()
{
    while (
true)
    {
    
wait 0.2;
    foreach (
player in level.players)
    {
        if (!
isDefined(player) || !isPlayer(player))
            {
                continue;
            }
        if (
player.origin[2] < 1750)
            {
                
self iPrintlnBold"You are below the boundary!" );
                
player suicide();
            }
        }
    }


Call in Init:
Code:
    thread boundary_trigger();
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Plugins are not working clemi555 7 4,826 11-03-2013, 10:55
Last Post: d0h!
  [Release] Working Aimbot The Clay Man 17 20,358 10-21-2013, 15:10
Last Post: zurasaur
  How to get models working? Erik The Born 2 3,052 04-28-2013, 08:19
Last Post: Erik The Born
  [d3d9.dll] MW3 Server Has Stopped Working.. bertancakici 4 6,496 11-16-2012, 01:09
Last Post: JariZ
  the big show-what-you're-working-on thread JariZ 183 77,047 09-07-2012, 21:32
Last Post: Nekochan
  server stop working s.j-rez 9 5,227 08-26-2012, 06:23
Last Post: s.j-rez
  stop working eror{please help me:((} s.j-rez 0 1,914 08-25-2012, 12:47
Last Post: s.j-rez
Question Help what dvars can be used and working, in forceclientdvars? founderlj 1 2,248 08-20-2012, 08:21
Last Post: d0h!
Rainbow [TIP] How to get maps working. Nekochan 6 4,503 06-26-2012, 11:31
Last Post: JariZ
  Mods not working mousey920737 6 4,415 06-09-2012, 11:06
Last Post: JariZ

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.