Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 53 Guests
Online:

LATEST FORUM THREADS

»
Gaming
Q4 General
eXtreme+ v2.9
CoDBO Map + Mod Releases
map loading error
CoD2 MP Mapping
Good Servers on PC
CoDBO General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Script DMG
Dobriy
General Member
Since: Mar 31, 2011
Posts: 96
Last: May 23, 2012
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Mar. 27, 2012 08:57 pm
yes
Code:
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)			
{
	if( !isAlive(players[i]) && players[i].pers["team"] == "allies" && self!= players[i])
    {
	if(distance(self.origin, players[i].origin)) < 600)
	self thread [[level.callbackPlayerDamage]](self, self, 1, 0, "MOD_RIFLE_BULLET", "PPS42_mp", self.origin, (0,0,0), "none", 0);//dmg to itself
    }
}
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Wednesday, Mar. 28, 2012 01:19 am
Dobriy writes...
Quote:
yes
Code:
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)			
{
	if( !isAlive(players[i]) && players[i].pers["team"] == "allies" && self!= players[i])
    {
	if(distance(self.origin, players[i].origin)) < 600)
	self thread [[level.callbackPlayerDamage]](self, self, 1, 0, "MOD_RIFLE_BULLET", "PPS42_mp", self.origin, (0,0,0), "none", 0);//dmg to itself
    }
}



Now all you do is make players die that come close to players already dead. Remove the ! before isalive()
Share |
Dobriy
General Member
Since: Mar 31, 2011
Posts: 96
Last: May 23, 2012
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Wednesday, Mar. 28, 2012 11:45 am
Didn't see it as it in the original I was simple took and added function as the author asked
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»