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

Members Online

»
0 Active | 109 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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
Category: CoD+UO General
General game questions, comments, and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: I need help scripting health
smxraven
General Member
Since: Jun 28, 2009
Posts: 3
Last: Jul 12, 2009
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 10:44 am
I am working on a jump mod, but ppl keep killing all the jumpers on the server...How would I keep people from killing others but still be able to use weapons and nades
Share |
oppdelta
General Member
Since: Jun 3, 2007
Posts: 143
Last: Apr 27, 2011
[view latest posts]
Level 4
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 10:50 am
There is already 5 - 6 version of the jump mod already on COD... Why make another one?
Share |
smxraven
General Member
Since: Jun 28, 2009
Posts: 3
Last: Jul 12, 2009
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 10:50 am
Im making 1 for my clan so we can have our own xD
Share |
oppdelta
General Member
Since: Jun 3, 2007
Posts: 143
Last: Apr 27, 2011
[view latest posts]
Level 4
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 11:18 am
It will inevitably get stolen but you gotta edit the, i think, _utility.gsc

and change the damage script to make it do nothing. I never really looked into it. Or you could just change the _team.gsc

and where it has the playerConnect() { <-- Something like that.

put

self.health = 999999;



I'm just guessing the .gsc's so wait until someone comes on.


PLEASE MAKE A BACKUP OF THE PK3 CONTAINING THE GSC'S FIRST aint my fault if you do anything wrong :P
Share |
Wally.*
General Member
Since: Dec 2, 2007
Posts: 49
Last: Jul 7, 2009
[view latest posts]
Level 2
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 11:28 am
I'm assuming you know a bit about scripting.

Make a script and at the OnPlayerSpawned put something like:
self.neverdie = true;
The in _globallogic.gsc at the Callback_PlayerDamage function you'll see a bunch of IF() statments and in between the 4th and 5th put:
if( self.neverdie ) return;

This will act like a never ending spawn protection and should allow everyone to play without ever talking any damage.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 11:28 am
isn't there a playerdamage callback function?
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 12:17 pm
Yeah, there's a playerdamage callback in the gametype scripts

Add this to the top of the function

Code:

	if(isValidPlayer(eAttacker) && eAttacker != self)
		return;


edited on Jun. 28, 2009 08:18 am by .KiLL3R.
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 01:43 pm
Wally.* writes...
Quote:
I'm assuming you know a bit about scripting.

Make a script and at the OnPlayerSpawned put something like:
self.neverdie = true;
The in _globallogic.gsc at the Callback_PlayerDamage function you'll see a bunch of IF() statments and in between the 4th and 5th put:
if( self.neverdie ) return;

This will act like a never ending spawn protection and should allow everyone to play without ever talking any damage.


I think this thread is about COD1 which didnt have a _globallogic.gsc file. As such, the OP will have to put KiLL3R's return code in every gametype .GSC file at the Callback_PlayerDamage() method.

One thought - is isValidPlayer() a COD1 function? I see isPlayer() but not isValidPlayer(). Isnt isValidPlayer() a HL2 function?
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 01:49 pm
ah, isValidPlayer() is a UO function too, isPlayer() for CoD1 :p


Code:

	if(isPlayer(eAttacker) && eAttacker != self)
		return;
Share |
Wally.*
General Member
Since: Dec 2, 2007
Posts: 49
Last: Jul 7, 2009
[view latest posts]
Level 2
Category: CoD+UO General
Posted: Sunday, Jun. 28, 2009 02:15 pm
DemonSeed writes...
I think this thread is about COD1 which didnt have a _globallogic.gsc file.

lol, Sorry I thought the thread was General CoD gaming, maybe the forum headings should be changed to CoD1, then I wouldn't look like such a tool, lol , damn u admins [mad]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD+UO General

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

»