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

Members Online

»
0 Active | 49 Guests
Online:

LATEST FORUM THREADS

»
Mohaa maps on Cod2?
CoD2 MP 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:
Latest Posts by Pedro699
These topics are the latest to have been updated with new posts.
Show me more: 50 100 150
MODSonline.com Forums
Latest Posts
Subscribed Posts
Search
  Topic Replies Views Last Post
HUD infront of Menu
Call of Duty 2 : CoD2 Scripting
You need to add a new itemdef to the menu and position it as you want. Here is an example from serverinfo_sd.menu: Code:// MESSAGE OF THE DAY itemDef { name "text_motd" visible 1 rect 0 0 480 150 origin 80 267 forecolor 1... [more]
8 2180 Dec 18, 2010 08:58 am
by Pedro699
HUD infront of Menu
Call of Duty 2 : CoD2 Scripting
No it isn't possible, menus always overlay the HUD, even if it isn't fullscreen. Simply apply the text you want to display to the menu files and package them with your mod instead. If the text is dynamic (it changes) then use cvars to set up the men... [more]
8 2180 Dec 18, 2010 06:16 am
by Pedro699
Disabling Weapons for a particular team...
Call of Duty 4 : CoD4 Scripting
Does the script not work? Looks fine in principle, although you will need to stick both of the functions in a while loop to cover multiple activations of the trigger. And you don't need to turn the trigger on / off as this may allow additional playe... [more]
6 3094 Dec 18, 2010 02:45 am
by Pedro699
Advanced Scripting Question
Call of Duty 2 : CoD2 Scripting
The !give code looks fine, although you'll probably want to check that the weapon being given is a valid string. There are a list of weapon names in maps/mp/gametypes/_weapons.gsc that you can pull out and modify. For the !giveammo command, simply set ... [more]
7 2380 Dec 17, 2010 04:13 am
by Pedro699
Advanced Scripting Question
Call of Duty 2 : CoD2 Scripting
You can offset the target by making this modification: playerToMove setorigin( target + (0,0,10) ); I think you may be correct about player not getting stuck in each other, as with large servers which sometimes have twice as many players as spawnpoi... [more]
7 2380 Dec 16, 2010 05:33 am
by Pedro699
Advanced Scripting Question
Call of Duty 2 : CoD2 Scripting
As liltc says try a simple iprintln first. Having looked at your script there are a number of issues with it. First off, you say you want to move a player, but you appear to be spawning a model and moving it up a bit instead. You also have 4 differ... [more]
7 2380 Dec 15, 2010 06:28 am
by Pedro699
Pick numbers
Call of Duty 2 : CoD2 Scripting
I'm a little confused. Can you explain what you want to do more thoroughly? If you just want a set of rotating messages in the same place there is no need to create new hudelems for each one - you can just change the contents of the message.... [more]
23 1198 Dec 4, 2010 04:34 am
by Pedro699
Moving a trigger
Call of Duty 2 : CoD2 Scripting
You may need to add an origin brush to the trigger, otherwise the game assumes its origin is at (0,0,0). Check out the sd_bombtrigger.map file in radient to see how to create one. This is a moveable use trigger for defusing the bomb in S&D.... [more]
13 1590 Dec 3, 2010 06:42 pm
by Pedro699
collision map for mp
Call of Duty 2 : CoD2 Scripting
You can move a player to a set coordinate position with the setOrigin() function: eg. pos = (20,90,10); player setOrigin(pos);... [more]
33 1572 Dec 1, 2010 06:10 am
by Pedro699
holding a key.
Call of Duty 2 : CoD2 Scripting
Has anyone tried using an execkey line in the hud.menu file checking the "w" key? Regardless it is not possible to check if the player is holding down the key as all menu responses (afaik) are only fired once when the key is first pressed down. If y... [more]
16 2051 Nov 30, 2010 06:18 pm
by Pedro699
Element on players in compass
Call of Duty 2 : CoD2 Scripting
The difference? Its the word 'thread' This tells the script engine to start your function (which has an infinite loop) but to continue with what it was doing before. Before the calling function was waiting for your objective loop to end before continui... [more]
25 1660 Nov 28, 2010 03:17 pm
by Pedro699
Element on players in compass
Call of Duty 2 : CoD2 Scripting
You must thread the function - this will solve your weapon changing problem I suspect: self thread showAlliedObjective(); As for your aim - it isn't possible unless there are 16 players or less in the server, and if running something like S&D which ... [more]
25 1660 Nov 27, 2010 04:53 pm
by Pedro699
Element on players in compass
Call of Duty 2 : CoD2 Scripting
Where are you running this function from? And how? It sounds as if you are not threading the code. As regards the objective number you need to keep a track of which of the available numbers are available (0-15). Some of these will be used by gametypes.... [more]
25 1660 Nov 27, 2010 09:41 am
by Pedro699
Element on players in compass
Call of Duty 2 : CoD2 Scripting
Where are you running the code? It should have its own thread so it does not interfere with any other script.... [more]
25 1660 Nov 27, 2010 05:54 am
by Pedro699
Element on players in compass
Call of Duty 2 : CoD2 Scripting
The green player triangles are hard-coded - they are not editable (except changing the image file which affects all of them). The compass icons are called objective icons - look in ctf.gsc for how they are used there. Search for objective and check out... [more]
25 1660 Nov 26, 2010 11:45 am
by Pedro699
Menu File
Call of Duty 2 : CoD2 Scripting
You can bind a text input to a dvar however, as far as I know, there is no way to get that dvar to the server. Perhaps if you explain in detail what you are trying to do with the result we can suggest a different way.... [more]
9 1679 Nov 23, 2010 01:14 am
by Pedro699
Menu File
Call of Duty 2 : CoD2 Scripting
The only way you can place custom information from a script into a menu is using dvars set on the client. For example, check how the Message of the day is implemented in the serverinfo_*.menu files in iw_15/ui_mp... [more]
9 1679 Nov 22, 2010 02:07 pm
by Pedro699
Set Grenade Plugin
Call of Duty 4 : CoD4 Map + Mod Releases
Does this work on servers that are not running in developer mode as I was under the impression that the timescale dvar was cheat protected. It would also slow down everyone else who was in the server while the nade was in flight. Video is very cool! ... [more]
5 2344 Nov 17, 2010 11:44 am
by Pedro699
How to end a thread
Call of Duty 2 : CoD2 Scripting
clanhelio writes...Quote:Instead of the notifier, you could just put Code:return; This is the best way to end the current thread. Only use endon / notify when you want to stop a thread from a separate function as there is a memory overhead for the... [more]
16 1342 Nov 14, 2010 03:50 am
by Pedro699
Random Player
Call of Duty 2 : CoD2 Scripting
Leal writes...Quote: But if I want to use the random player in an other thread? I used it as a level. variable and it seems to work fine. So use: Code:level.randPlayer = getRandomPlayer("axis"); Then level.randPlayer is available everywhere.... [more]
24 1847 Nov 11, 2010 11:51 am
by Pedro699
Random Player
Call of Duty 2 : CoD2 Scripting
Leal writes...Quote:Can I use "randPlayer" as "level.randPlayer"? It's for making a iprintln of the "randPlayer.name" later in an other part of the script. And what do this "returns" in this part? The code is a standalone function and functions re... [more]
24 1847 Nov 10, 2010 07:49 am
by Pedro699
Random Player
Call of Duty 2 : CoD2 Scripting
You code won't work liltc as there is a syntax error and the appearance of a level array from somewhere. I would solve the original specification with two functions: First get a random player on a team: Code:getRandomPlayer(team) { teamPlaye... [more]
24 1847 Nov 9, 2010 11:03 am
by Pedro699
Making An App Utility. Which Environment To Use?
MODSonline : General
SparkyMcSparks writes...Quote:Just trying to make an app to manage user files and move them around. Only for Windows platform. With VB would users have to install a redistributable to use the program? Sounds like a variation of C with .NET might be ... [more]
8 2141 Nov 7, 2010 04:34 am
by Pedro699
Making An App Utility. Which Environment To Use?
MODSonline : General
Depends on its target and use really. If you are going for multiplatform then I would say Java, as they make a runtime for every major operating system (including mobile devices - not iPhone though AFAIK) If speed / performance is important then C++... [more]
8 2141 Nov 6, 2010 08:09 pm
by Pedro699
Change Player in Object
Call of Duty 2 : CoD2 Scripting
The xmodel 'codes' are just the xmodel names, which are found in iw_13.iwd. However, you cannot allow use of all xmodels as you must first precache the models at the very start of the script and it is a waste of resources to precache every model. I ... [more]
25 1949 Nov 6, 2010 04:50 pm
by Pedro699
MODSonline.com Forums

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

»