MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
Tridon [Forum]
Bullseye161 [Downl]

2 Members and 10 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Sunday, Jan. 4th
MODSonair 161 Live
Friday, Jan. 2nd
MODSonair Episode 160
Thursday, Jan. 1st
HAPPY NEW YEAR MODSONLINE AND ALL
Sunday, Dec. 28th
MODSonair 160 Live
Saturday, Dec. 27th
MODSonline Holiday Pwnage
Latest Poll
Modsonair audio or video?
Video from here on. 48.57%
Sticking with audio. 2.86%
Either is good. 17.14%
What is modsonair? 31.43%
Read More...
4 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
How 'bout law?
MODSonline.. Posts: (4) Views: (35) by tomalla
Secret Keypad Door.... Help :'(
CoD 2 Level Desi.. Posts: (1) Views: (14) by NotDeadYet
Zombies Crashing?
CoD:WW Zombie/Co.. Posts: (3) Views: (26) by Sgt.Rampage
More dead bodies
CoD 4 Scripting.. Posts: (2) Views: (16) by Sevenz
Art of War Central Half-Life 2 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, supersword, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Prone check
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, May. 4, 2007 04:33 pm
does anyone know of a code that checks the player stance?[banghead]
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11622
Last: Jan 3, 2009
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Saturday, May. 5, 2007 08:07 am
in SP you can use the function getstance(), so probably in MP too.
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, May. 5, 2007 08:51 am
could you show me an example of how I would write it?
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11622
Last: Jan 3, 2009
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Saturday, May. 5, 2007 08:54 am
trig = getent ("trigger", "targetname");
trig waittill ("trigger", other);
other getstance();

you can also use it in a if loop.. like this

if (other getstance() == "prone")
{
...
}
The_Preacher
General Member
Since: May 23, 2006
Posts: 596
Last: Jan 13, 2008
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Saturday, May. 5, 2007 09:21 am
A bit off topic, on our servers you have to stay crouched, we use a code that checks to see if the player is crouched or running, after a set time if the player is still running he get's a message in his face warning him to stop running and stay crouched, after 3 warnings his gun is disabled for a set number of seconds.
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, May. 5, 2007 09:51 am
Is your server the 509th? and are you using the awe mod?
The_Preacher
General Member
Since: May 23, 2006
Posts: 596
Last: Jan 13, 2008
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Saturday, May. 5, 2007 10:04 am
No, I'm not with the 509th, but I've been on their servers[wink]

We use the Extreme Mod, your clan name?
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, May. 5, 2007 09:08 pm
ooooh I'm with the 105thSTS we are trying to get this to work with our mod that we are making. We dont want to use the extreme or awe.[crazy]
TheModDoctor
General Member
Since: Apr 27, 2007
Posts: 171
Last: Jan 2, 2009
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, May. 12, 2007 05:08 am
Is it possible to change the stance when you go through a trigger? Like maybe:

trig = getent("trig_name", "targetname");
trig waittill ("trigger");

What then?
The_Preacher
General Member
Since: May 23, 2006
Posts: 596
Last: Jan 13, 2008
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Saturday, May. 12, 2007 06:10 am
Webber, this is what we are using now, but like I said, I'm using the Extreme Mod, but you might be able to do something with it.


Code:
//////////////No Run Added//////////////////
 

runner()
{
 level endon("ex_gameover");
 self endon("disconnect"); 
 self endon("ex_dead");
a = 0; 
 
 for(;;)
 {
 
  position = self getorigin();
        wait 5;
        compareposition = self getorigin();  
ren = distance(position,compareposition);
uuu = self [[level.ex_getstance]](false);
 
//******First Offense****************
if(uuu == 0 && ren > 500 && a==0) self iprintlnBold("^1STOP Running^7  " + self.name + " ^1Or Your Weapon Will Be Disabled!" ); 
if(uuu == 0 && ren > 500) a=a+1; 
 
//********Second Offense**************
if(uuu == 0 && ren > 500 && a==2) self iprintlnBold(self.name + " ^12nd Running Warning, ^7Weapon disabled for ^14 seconds!");
if(uuu == 0 && ren > 500 && a==2) self disableWeapon();
wait 4;
if(uuu == 0 && ren > 500 && a==2) self enableWeapon();
 
//**********Third Offense***************
if(uuu == 0 && ren > 500 && a==3) self iprintlnBold(self.name + " ^1LAST WARNING, ^7You Dropped Your weapon");
if(uuu == 0 && ren > 500 && a==3) self thread extreme\_ex_weapons::dropcurrentweapon();
 
//**********Sixth Offense***************
if(uuu == 0 && ren > 500 && a==4) self iprintlnBold(self.name + " ^1You have been kicked for running! You may rejoin ^7IF^1 you follow server rules!!");
if(uuu == 0 && ren > 500 && a==4) iprintln(self.name + " ^1 has been kicked for constant running!!");
wait 3;
if(uuu == 0 && ren > 500 && a==4) kick(self getEntityNumber());
 

    }
}

Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2009.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Art of War Central
Partners
The Firing Box
CODAddicts - Call of Duty News & Downloads
Battle for Europe COD2
XoXide
Frag Universe
Call of Duty Headquarters
modbase.be
Ask About
Advertising
Friends
After Life Gaming
The Clan Database
Volcano
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 160
MODSonair Episode 159
MODSonair Episode 158
MODSonair Episode 157
MODSonair Episode 156
Next Show
The next MODSonair show will air LIVE on:
01/11/2009 12:00 EST

Time remaining:
Copyright © 2009 MODSonline
Tresware Content Management System Copyright © 2009 Tresware
Website Designed and Hosted   Tresware