• 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.
[-] The following 1 user says Thank You to master131 for this post:
  • DidUknowiPwn
  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 1,637 11-03-2013, 10:55
Last Post: d0h!²
  [Release] Working Aimbot The Clay Man 17 13,397 10-21-2013, 15:10
Last Post: zurasaur
  How to get models working? Erik The Born 2 1,144 04-28-2013, 08:19
Last Post: Erik The Born
  [d3d9.dll] MW3 Server Has Stopped Working.. bertancakici 4 3,792 11-16-2012, 01:09
Last Post: JariZ
  the big show-what-you're-working-on thread JariZ 183 24,506 09-07-2012, 21:32
Last Post: Nekochan
  server stop working s.j-rez 9 1,728 08-26-2012, 06:23
Last Post: s.j-rez
  stop working eror{please help me:((} s.j-rez 0 780 08-25-2012, 12:47
Last Post: s.j-rez
Question Help what dvars can be used and working, in forceclientdvars? founderlj 1 888 08-20-2012, 08:21
Last Post: d0h!
Rainbow [TIP] How to get maps working. Nekochan 6 1,750 06-26-2012, 11:31
Last Post: JariZ
  Mods not working mousey920737 6 1,570 06-09-2012, 11:06
Last Post: JariZ

Forum Jump:


Users browsing this thread: 1 Guest(s)