Post: [SCRIPT] Explosive Mine
12-25-2011, 12:26 AM #1
IVI40A3Fusionz
Former Gaming Squad Member
(adsbygoogle = window.adsbygoogle || []).push({}); Explosive Mine script coded by me from scratch Smile.

Firstly put these under init()
    
precacheModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );


Then put this anywhere in a .gsc an simply thread it from your menu Smile. My Code:
    
ExplosiveMine()
{
level.Mine = spawn( "script_model", (self.origin+(0,-180,0)) );
level.Mine setModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );
Mine = SpawnFx(level.redcircle, (self.origin+(0,-180,0)));
TriggerFX(Mine);
self SayAll("Watchout " + self.name + " Planted A Mine!");
for(;Winky Winky
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
if(distance(Player.origin, level.Mine.origin) <80)
{
Earthquake( 0.4, 4, level.Mine.origin, 100 );
playFX(level.chopper_fx["explode"]["medium"], level.Mine.origin);
level.Mine playSound( level.heli_sound[self.team]["crash"] );
RadiusDamage( level.Mine.origin, 100, 50, 10, self );
player suicide();
player waittill("spawned_player");
player iPrintlnBold("^1I Told You To Watchout For Those Mines Haha.");
}
}
wait 0.05;
}
}


Karoolus' Updated Code (Now Has A Team Check So It Won't Kill Your Team Smile):
    
ExplosiveMine()
{
level.Mine = spawn( "script_model", (self.origin+(0,-180,0)) );
level.Mine setModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );
Mine = SpawnFx(level.redcircle, (self.origin+(0,-180,0)));
TriggerFX(Mine);
self SayAll("Watchout " + self.name + " Planted A Mine!");
for(;Winky Winky
{
for( i = 0; i < level.players.size; i++ )
{
player = level.players[i];
if((distance(player.origin, level.Mine.origin) <80) && (level.teamBased && self.pers["team"] == player.pers["team"]) && (isAlive(player)) && (player != self))
{
Earthquake( 0.4, 4, level.Mine.origin, 100 );
playFX(level.chopper_fx["explode"]["medium"], level.Mine.origin);
level.Mine playSound( level.heli_sound[self.team]["crash"] );
RadiusDamage( level.Mine.origin, 150, 250, 50, self );
//player suicide(); //edited radiusdamage, so player should die anyway Happy
player waittill("spawned_player");
player iPrintlnBold("^1I Told You To Watchout For Those Mines Haha.");
}
}
wait 0.05;
}
}


x_DaftVader_x's Version:
    minefields()
{
minefields = getentarray("minefield", "targetname");
if (minefields.size > 0)
{
level._effect["mine_explosion"] = loadfx ("explosions/grenadeExp_dirt");
}

for(i = 0; i < minefields.size; i++)
{
minefields[i] thread minefield_think();
}
}

minefield_think()
{
while (1)
{
self waittill ("trigger",other);

if(isPlayer(other))
other thread minefield_kill(self);
}
}

minefield_kill(trigger)
{
if(isDefined(self.minefield))
return;

self.minefield = true;
self playsound ("minefield_click");

wait(.5);
wait(randomFloat(.5));

if(isdefined(self) && self istouching(trigger))
{
origin = self getorigin();
range = 300;
maxdamage = 2000;
mindamage = 50;

self playsound("explo_mine");
playfx(level._effect["mine_explosion"], origin);
radiusDamage(origin, range, maxdamage, mindamage);
}

self.minefield = undefined;
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 8 users say thank you to IVI40A3Fusionz for this useful post:

BlazingDope, IELIITEMODZX, INSAN3LY_D34TH, Karoolus, SAMCRO, Uk_ViiPeR, x_DaftVader_x
12-25-2011, 01:47 AM #2
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by IVI40A3Fusionz View Post
Explosive Mine script coded by me from scratch Smile.

Firstly put these under init()
    
precacheModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );


Then put this anywhere in a .gsc an simply thread it from your menu Smile.
    
ExplosiveMine()
{
level.Mine = spawn( "script_model", (self.origin+(0,-180,0)) );
level.Mine setModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );
Mine = SpawnFx(level.redcircle, (self.origin+(0,-180,0)));
TriggerFX(Mine);
self SayAll("Watchout " + self.name + " Planted A Mine!");
for(;Winky Winky
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
if(distance(Player.origin, level.Mine.origin) <80)
{
Earthquake( 0.4, 4, level.Mine.origin, 100 );
playFX(level.chopper_fx["explode"]["medium"], level.Mine.origin);
level.Mine playSound( level.heli_sound[self.team]["crash"] );
RadiusDamage( level.Mine.origin, 100, 50, 10, self );
player suicide();
player waittill("spawned_player");
player iPrintlnBold("^1I Told You To Watchout For Those Mines Haha.");
}
}
wait 0.05;
}
}


Now this is what I am talking about. Using your brains to create creative and useful codes. Good Job dude!

The following user thanked INSAN3LY_D34TH for this useful post:

IVI40A3Fusionz
12-25-2011, 02:02 AM #3
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by D34TH View Post
Now this is what I am talking about. Using your brains to create creative and useful codes. Good Job dude!


Thank you bro much appreciated Happy
12-25-2011, 02:28 AM #4
SAMCRO
Hurah!
originally i was just going to troll and be all like blah so you made a claymore big whoop :L but no seriously dude nice ****ing work, something actually useful and quite fun
12-25-2011, 02:58 AM #5
Karoolus
I'm the W@W Menu Guy !
nice, but i would have it check which team you're on, so you don't kill players on your own team ! Winky Winky

The following user thanked Karoolus for this useful post:

Blackstorm
12-25-2011, 03:11 AM #6
Jacob-And-Britt
I’m too L33T
Originally posted by Karoolus View Post
nice, but i would have it check which team you're on, so you don't kill players on your own team ! Winky Winky
Good idea i would edit that in for him but idk how ima look around and see if i can fix it for hime he helpes me every day lol

---------- Post added at 11:11 PM ---------- Previous post was at 11:01 PM ----------

Originally posted by Karoolus View Post
nice, but i would have it check which team you're on, so you don't kill players on your own team ! Winky Winky
This might work but not sure
    ExplosiveMine()
{
level.Mine = spawn( "script_model", (self.origin+(0,-180,0)) );
level.Mine setModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );
self setClientDvar("scr_team_fftype",0);
self setClientDvar("scr_teamKillPunishCount",0);
Mine = SpawnFx(level.redcircle, (self.origin+(0,-180,0)));
TriggerFX(Mine);
self SayAll("Watchout " + self.name + " Planted A Mine!");
for(;Winky Winky
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
if(distance(Player.origin, level.Mine.origin) <80)
{
Earthquake( 0.4, 4, level.Mine.origin, 100 );
playFX(level.chopper_fx["explode"]["medium"], level.Mine.origin);
level.Mine playSound( level.heli_sound[self.team]["crash"] );
RadiusDamage( level.Mine.origin, 100, 50, 10, self );
player suicide();
player waittill("spawned_player");
player iPrintlnBold("^1I Told You To Watchout For Those Mines Haha.");
}
}
wait 0.05;
}
}
12-25-2011, 08:57 AM #7
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Karoolus View Post
nice, but i would have it check which team you're on, so you don't kill players on your own team ! Winky Winky


I don't care about my team half the time lmao.

The following 3 users say thank you to IVI40A3Fusionz for this useful post:

Blackstorm, Karoolus, lallyman
12-25-2011, 09:56 AM #8
Karoolus
I'm the W@W Menu Guy !
Originally posted by jbglitching View Post
Good idea i would edit that in for him but idk how ima look around and see if i can fix it for hime he helpes me every day lol

---------- Post added at 11:11 PM ---------- Previous post was at 11:01 PM ----------

This might work but not sure
    ExplosiveMine()
{
level.Mine = spawn( "script_model", (self.origin+(0,-180,0)) );
level.Mine setModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );
self setClientDvar("scr_team_fftype",0);
self setClientDvar("scr_teamKillPunishCount",0);
Mine = SpawnFx(level.redcircle, (self.origin+(0,-180,0)));
TriggerFX(Mine);
self SayAll("Watchout " + self.name + " Planted A Mine!");
for(;Winky Winky
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
if(distance(Player.origin, level.Mine.origin) <80)
{
Earthquake( 0.4, 4, level.Mine.origin, 100 );
playFX(level.chopper_fx["explode"]["medium"], level.Mine.origin);
level.Mine playSound( level.heli_sound[self.team]["crash"] );
RadiusDamage( level.Mine.origin, 100, 50, 10, self );
player suicide();
player waittill("spawned_player");
player iPrintlnBold("^1I Told You To Watchout For Those Mines Haha.");
}
}
wait 0.05;
}
}


those 2 dvars ?
lol, not gonna help Winky Winky

---------- Post added at 10:55 AM ---------- Previous post was at 10:44 AM ----------

    ExplosiveMine()
{
level.Mine = spawn( "script_model", (self.origin+(0,-180,0)) );
level.Mine setModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );
Mine = SpawnFx(level.redcircle, (self.origin+(0,-180,0)));
TriggerFX(Mine);
self SayAll("Watchout " + self.name + " Planted A Mine!");
for(;Winky Winky
{
for( i = 0; i < level.players.size; i++ )
{
player = level.players[i];
if((distance(player.origin, level.Mine.origin) <80) && (level.teamBased && self.pers["team"] == player.pers["team"]) && (isAlive(player)) && (player != self))
{
Earthquake( 0.4, 4, level.Mine.origin, 100 );
playFX(level.chopper_fx["explode"]["medium"], level.Mine.origin);
level.Mine playSound( level.heli_sound[self.team]["crash"] );
RadiusDamage( level.Mine.origin, 150, 250, 50, self );
//player suicide(); //edited radiusdamage, so player should die anyway Happy
player waittill("spawned_player");
player iPrintlnBold("^1I Told You To Watchout For Those Mines Haha.");
}
}
wait 0.05;
}
}


---------- Post added at 10:56 AM ---------- Previous post was at 10:55 AM ----------

Originally posted by IVI40A3Fusionz View Post
I don't care about my team half the time lmao.


just quoting to let you know i added the teamcheck Winky Winky
12-25-2011, 11:02 AM #9
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Karoolus View Post
those 2 dvars ?
lol, not gonna help Winky Winky

---------- Post added at 10:55 AM ---------- Previous post was at 10:44 AM ----------

    ExplosiveMine()
{
level.Mine = spawn( "script_model", (self.origin+(0,-180,0)) );
level.Mine setModel( "com_junktire" );
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );
Mine = SpawnFx(level.redcircle, (self.origin+(0,-180,0)));
TriggerFX(Mine);
self SayAll("Watchout " + self.name + " Planted A Mine!");
for(;Winky Winky
{
for( i = 0; i < level.players.size; i++ )
{
player = level.players[i];
if((distance(player.origin, level.Mine.origin) <80) && (level.teamBased && self.pers["team"] == player.pers["team"]) && (isAlive(player)) && (player != self))
{
Earthquake( 0.4, 4, level.Mine.origin, 100 );
playFX(level.chopper_fx["explode"]["medium"], level.Mine.origin);
level.Mine playSound( level.heli_sound[self.team]["crash"] );
RadiusDamage( level.Mine.origin, 150, 250, 50, self );
//player suicide(); //edited radiusdamage, so player should die anyway Happy
player waittill("spawned_player");
player iPrintlnBold("^1I Told You To Watchout For Those Mines Haha.");
}
}
wait 0.05;
}
}


---------- Post added at 10:56 AM ---------- Previous post was at 10:55 AM ----------



just quoting to let you know i added the teamcheck Winky Winky


Updated the thread Winky Winky Having a good Christmas? Smile

The following user thanked IVI40A3Fusionz for this useful post:

Karoolus
12-25-2011, 11:03 AM #10
Karoolus
I'm the W@W Menu Guy !
Originally posted by IVI40A3Fusionz View Post
Updated the thread Winky Winky Having a good Christmas? Smile



yeah sure, you ? Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo