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

Members Online

»
0 Active | 7 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 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 subscribe
Author Topic: HitLoc and Player Names script
amr12391
General Member
Since: Feb 17, 2005
Posts: 401
Last: Mar 26, 2006
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Monday, Feb. 13, 2006 02:41 am
Hello, im tryin to make it say when you killed someone where you shot them and WHO you shot like this.

attacker iprintln("You shot him in the" + hitlocation + "from " + meters + " meter(s) away!");

Will say

You shot him in the Head from 5.3245 meter(s) away!

I want it to say

You shot (Who you killed) in the Head from 5.32311 meter(s) away! What would be the line of code?
Share |
BR3NTB
General Member
Since: Jun 20, 2004
Posts: 893
Last: Mar 3, 2006
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Monday, Feb. 13, 2006 05:05 pm
This may be what ur lookin for.

================
Called when a player has been killed.
self is the player that was killed.
================



CodeCallback_PlayerKilled(eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration)
{
self endon("disconnect");
[[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);
}



NOTE: The **** in the above code spells poo-poo, sorry I didnt write the code. it is actually "S Hit Loc" hit location but put togeather spells the unallowed word.
[smokin]

Hope this helps.

Script source[_callbacksetup.gsc]
edited on Feb. 13, 2006 12:09 pm by ßŔ3NT

edited on Feb. 13, 2006 12:12 pm by ßŔ3NT
Share |
amr12391
General Member
Since: Feb 17, 2005
Posts: 401
Last: Mar 26, 2006
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Tuesday, Feb. 14, 2006 09:09 pm
Ok i uderstand thats the code but how would i insert that into my default script? [smokin]
Share |
Restricted Access Topic is Locked 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

»