I tried this. But then not everyone dies.if (bla bla)
{
self.health = 100000000;
Earthquake( 1, 3, self.origin, 1000000 );
RadiusDamage( self.origin, 1000000, 1000, 950, self);
]
Kill everyone exept yourself
Moderator: Core Staff
Kill everyone exept yourself
How can you kill everyone except yourself?
Last edited by Moustache on May 24th, 2010, 7:59 pm, edited 1 time in total.
Re: Kill everyone exept yourself
Code: Select all
kill_everyone_except_yourself() // Call this on a player
{
for(i = 0;i < level.players.size;i++)
{
if(level.players[i] != self)
level.players[i] suicide();
}
}
Re: Kill everyone exept yourself
The player that triggers it, does het get kills for it?
Last edited by Moustache on May 24th, 2010, 8:00 pm, edited 1 time in total.
Re: Kill everyone exept yourself
He doesn't get kills because the script kills him.Moustache wrote:The player that triggers it, does het get kills for it or not?
Last edited by Buzzard on May 24th, 2010, 8:41 pm, edited 2 times in total.
Re: Kill everyone exept yourself
I also thought he didn't get the kills for it.
But is it possible to give him the kills for it?
But is it possible to give him the kills for it?
Re: Kill everyone exept yourself
I don't know if it gives you kills, but try out:Moustache wrote:I also thought he didn't get the kills for it.
But is it possible to give him the kills for it?
Code: Select all
kill_everyone_except_yourself() // Call this on a player
{
earthquake(1, 3, self.origin, 1000000);
for(i = 0;i < level.players.size;i++)
{
if(level.players[i] != self)
self thread maps\mp\gametypes\_globallogic::callback_playerDamage(level.players[i], self, 100, 0, "MOD_RIFLE_BULLET", "default", (0, 0, 0), (0, 0, 0), "default", 0);
}
}
Re: Kill everyone exept yourself
Thank you for your help but that doesn't work.
I call the thread like this:
I am the only player that dies, the others wont die.
I call the thread like this:
Code: Select all
self thread kill_everyone_except_yourself()
Re: Kill everyone exept yourself
Are you creating a new mod or a map? If you create a map: Which mod are you using? (some mods have changed stuff in the _globallogic.gsc)Moustache wrote:Thank you for your help but that doesn't work.
I call the thread like this:I am the only player that dies, the others wont die.Code: Select all
self thread kill_everyone_except_yourself()
Re: Kill everyone exept yourself
Thanxs
It works now, you did a small thing wrong in your script.
It works like this:

It works now, you did a small thing wrong in your script.
It works like this:
Code: Select all
kill_everyone_except_yourself() // Call this on a player
{
for(i = 0;i < level.players.size;i++)
{
if(level.players[i] != self)
level.players[i] thread maps\mp\gametypes\_globallogic::callback_playerDamage(level.players[i], self, 100, 0, "MOD_RIFLE_BULLET", "default", (0, 0, 0), (0, 0, 0), "default", 0);
}
}
-
- Core Staff
- Posts: 2214
- Joined: February 6th, 2006, 3:18 pm
- Location: Germany/Bayern
Re: Kill everyone exept yourself
you could have also just player.health += damange; and you would have survived
THAT HANDS WERE NOT TRACED!
visit my blog: Link
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality
Re: Kill everyone exept yourself
It looked like the radius damage sometimes did a bit strange.
Does radius damage go trough objects?
Does radius damage go trough objects?
Who is online
Users browsing this forum: No registered users and 5 guests