no rpg area

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
bigbabol
CJ Newbie
CJ Newbie
Posts: 50
Joined: January 9th, 2011, 11:13 am

no rpg area

Post by bigbabol » January 29th, 2011, 4:53 pm

is it possible to make an area (not a map),probably with a trigger multiple,where u cannot use rpg or an area where u must use 125 fps?pls help :D

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: no rpg area

Post by Pedsdude » January 29th, 2011, 5:03 pm

Given what I know about restricting RPG/FPS, I think it almost certainly is possible, but I don't know enough to be able to help you :P Someone should be able to though, I would imagine Drofder, DanTheMan, Rezil among others should know!
Image
Image

bigbabol
CJ Newbie
CJ Newbie
Posts: 50
Joined: January 9th, 2011, 11:13 am

Re: no rpg area

Post by bigbabol » January 29th, 2011, 5:40 pm

Pedsdude wrote:Given what I know about restricting RPG/FPS, I think it almost certainly is possible, but I don't know enough to be able to help you :P Someone should be able to though, I would imagine Drofder, DanTheMan, Rezil among others should know!
ok thx i wait them :D

User avatar
Hoogie
Core Staff
Core Staff
Posts: 3974
Joined: September 2nd, 2008, 10:22 am
Location: Holland

Re: no rpg area

Post by Hoogie » January 29th, 2011, 9:16 pm

It is possible. Dan did it in mp_trial_2 i believe. Like the expert mode was 125 no rpg or something.
-=[[CoDJumper.com Movies]]=-
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]


A woman can fake an orgasm, but a man can fake an entire relationship

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: no rpg area

Post by waywaaaard » February 11th, 2011, 3:33 am

Yeah u can force the user to have an special fps and take him the rpg.. Search for force fps here in the forums and u will find a script
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

denzil3009
CJ Wannabe
CJ Wannabe
Posts: 7
Joined: February 18th, 2011, 11:15 pm
Gamertag: CW|Denzil

Re: no rpg area

Post by denzil3009 » February 18th, 2011, 11:18 pm

MP_Digital has it, maybe ask the person who created that map ?

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: no rpg area

Post by Pedsdude » February 19th, 2011, 1:49 pm

denzil3009 wrote:MP_Digital has it, maybe ask the person who created that map ?
I did, although I can't really help him - on mp_digital you can't use RPG anywhere on the map. He wants it so that it's only certain areas you can't use it.
Image
Image

User avatar
Buzzard
CJ Wannabe
CJ Wannabe
Posts: 23
Joined: November 5th, 2009, 7:13 pm

Re: no rpg area

Post by Buzzard » February 19th, 2011, 7:07 pm

Code: Select all

main()
{
       	[...]

	addFunc("no_rpg", ::no_rpg);
       	addFunc("fps", ::fps);
}

addFunc(targetname, function)
{
	entArray = getEntArray(targetname, "targetname");

	for(Idx = 0;Idx < entArray.size;Idx++)
	{
		if(isDefined(entArray[Idx]))
			thread [[function]](entArray[Idx]);
	}
}

no_rpg(trigger, user)
{
	if(!isDefined(user))
	{
		for(;;)
		{
			trigger waittill("trigger", user);

			if(isDefined(user.no_rpg))
				continue;

			thread no_rpg(trigger, user);
		}
	}

	user endon("disconnect");

	user.no_rpg = true;
      
	for(;user isTouching(trigger);)
	{
		if(!user isOnLadder() && !user isMantling() && weaponType(user getCurrentWeapon()) == "projectile")
		{
			if(user hasWeapon("beretta_mp"))
				user switchToWeapon("beretta_mp");
			else if(!user hasWeapon("beretta_mp") && user hasWeapon("deserteaglegold_mp"))
				user switchToWeapon("deserteaglegold_mp");
			else if(!user hasWeapon("beretta_mp") && !user hasWeapon("deserteaglegold_mp") && user hasWeapon("colt45_mp"))
				user switchToWeapon("colt45_mp");
			else if(!user hasWeapon("beretta_mp") && !user hasWeapon("deserteaglegold_mp") && !user hasWeapon("colt45_mp") && user hasWeapon("usp_mp"))
				user switchToWeapon("usp_mp");
			else
			{
				user giveWeapon("beretta_mp");
				user switchToWeapon("beretta_mp");
			}

			wait 1;
		}

		wait 0.75;
	}

	user.no_rpg = undefined;
}

fps(trigger, user)
{
	if(!isDefined(user))
	{
		for(;;)
		{
			trigger waittill("trigger", user);

			if(isDefined(user.fps))
				continue;

			thread fps(trigger, user);
		}
       	}

       	user endon("disconnect");

       	user.fps = true;

       	for(;user isTouching(trigger);)
       	{
               	user setClientDvar("com_maxFPS", 125);

		wait 0.05;
	}

	user.fps = undefined;
}
1: Put script into your map.gsc
2: Create Trigger Mulitple(s) for the area(s) where the player can't have a rpg or just can have 125 FPS
3: Link the trigger(s) to the script with giving the trigger(s) the targetname "no_rpg" or "fps"

Note: The "no_rpg"-Part was created by _DanTheMan_. I just changed some things to make it possible working on certain areas.

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: no rpg area

Post by Moustache » February 20th, 2011, 12:46 pm

I have not tested it but I have a question.

Why do you use:
for(;user isTouching(trigger);)
Instead of:
while( user isTouching(trigger) )

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: no rpg area

Post by Drofder2004 » February 20th, 2011, 2:05 pm

Moustache wrote:I have not tested it but I have a question.

Why do you use:
for(;user isTouching(trigger);)
Instead of:
while( user isTouching(trigger) )
I would guess it is simply an adaption of previously used languages learned.
So, if you are shown only to sue the for loop, and only using the 'while' section of it to mimic a while loop, then thats what you will always do.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests