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

Members Online

»
0 Active | 62 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: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: need some help with ranks
HITMAN934
General Member
Since: Sep 6, 2004
Posts: 160
Last: Aug 29, 2007
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Monday, Feb. 6, 2006 02:10 pm
Ok I just got back to work on a old mod of mine and was about to give it out as a beta but as I was testing it I saw that artillery was not working the way it should. I found why it was not working right but now I need some help fixing it. You see I added more ranks and you still get artillery on rank 4 but when you move up to rank 5, 6, 7, 8, ect you don't get artillery no more. here is the code

Code:
giveBinoculars(spawnweapon)
{
	binoctype = "binoculars_mp";
	
	self takeWeapon("binoculars_mp");
	self takeWeapon("binoculars_artillery_mp");
	
	// if they are highest rank then they get the artillery strike binoculars
	if ( self.pers["rank"] == 4 && level.allow_artillery)
	{
		
		if(self.pers["team"] == "allies")
		{
			switch(game["allies"])		
			{
			case "american":
				binoctype = "binoculars_artillery_mp";
				break;
	
			case "british":
				binoctype = "binoculars_artillery_mp";
				break;
	
			case "russian":
				binoctype = "binoculars_artillery_mp";
				break;
			}
		}
		else if(self.pers["team"] == "axis")
		{
			switch(game["axis"])
			{
			case "german":
				binoctype = "binoculars_artillery_mp";
				break;
			}			
		}


See the line if ( self.pers["rank"] == 4 && level.allow_artillery) I like to make that so it would give artillery for rank 4 and up but how ?

edited on Feb. 6, 2006 09:11 am by HITMAN934
Share |
LUN4TIC
General Member
Since: Apr 13, 2004
Posts: 162
Last: Feb 15, 2006
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Monday, Feb. 6, 2006 03:19 pm
just a wild guess as im not scripting wonder ... replace 4 with >3 and everything greater than 3 (meaning 4 and upward) gets it?


but again i have no clue on scripting hahahahaha


edited on Feb. 6, 2006 10:20 am by fastlane25th
Share |
Pop322
General Member
Since: Oct 26, 2005
Posts: 50
Last: Jun 11, 2007
[view latest posts]
Level 2
Category: CoDUO Mapping
Posted: Monday, Feb. 6, 2006 04:28 pm
i only started scripting not long ago but maybe try this..

Code:
if ( self.pers["rank"] == 4,5,6,7,8 && level.allow_artillery)


dunno if it will work but try it ^^

Pop322
Share |
HITMAN934
General Member
Since: Sep 6, 2004
Posts: 160
Last: Aug 29, 2007
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Monday, Feb. 6, 2006 07:32 pm
no none of that worked.

Oh here a link to see a pic of the code so you can see the lines better then how the forum puts the code. click here

edited on Feb. 6, 2006 02:40 pm by HITMAN934
Share |
supersword
General Member
Since: Jul 28, 2004
Posts: 1990
Last: Apr 18, 2024
[view latest posts]
Level 8
Forum Moderator
Im a fan of MODSonair
Category: CoDUO Mapping
Posted: Monday, Feb. 6, 2006 07:40 pm
Have a look inside This Mod.

It might be some help!
Share |
HITMAN934
General Member
Since: Sep 6, 2004
Posts: 160
Last: Aug 29, 2007
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Monday, Feb. 6, 2006 09:29 pm
supersword writes...
Quote:
Have a look inside This Mod.

It might be some help!


I looked at it and the code for the _rank_gmi.gsc has nothing that I am looking for. You see the game has 5 ranks and the 5th rank is the 40 points rank that gives you artillery. Well I made 5 new ranks to be added with the other ranks and I tested them and they all work as well. The problem is that you get artillery for the 40 point rank but after you move up to one of the new ranks you don't get artillery anymore. I found the reason why that is but i don't know how to fix it. The problem is that artillery in the _rank_gmi.gsc file are only set for rank 5 and I need to know how to set it so that people will get artillery for rank 5 and up.
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoDUO Mapping
Posted: Tuesday, Feb. 7, 2006 12:55 am
try something like:

if ( self.pers["rank"] >3 )
self.level.allow_artillery

not tested - but it should work

[angryalien]
Share |
HITMAN934
General Member
Since: Sep 6, 2004
Posts: 160
Last: Aug 29, 2007
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Sunday, Mar. 26, 2006 07:19 pm
Ok sorry for the late late reply but I have not been well and am only getting better now plus this is my last year in school so I been busy trying to pass it.

StrYdeR the code you gave me did not work but I got what I wanted any way so now I will be nice and give out what I did so other who are trying to do something like what I am doing can [cool]

I changed the code

Code:
if ( self.pers["rank"] == 4 && level.allow_artillery)


to

Code:
if ( self.pers["rank"] > 3 == level.allow_artillery)


and now I can get artillery for rank 4 and up.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

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

»