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

Members Online

»
0 Active | 4 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
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
Page
Next Page
subscribe
Author Topic: Limit weapons with the gsc
morgawr
General Member
Since: Dec 15, 2004
Posts: 374
Last: Oct 7, 2021
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Monday, Jan. 25, 2010 10:24 pm
Is it possible to have a map that only lets you play with rifles,
thats controlled through its gsc file.
thought I seen it set up in a gsc yrs ago but I don't recall the map or if it even worked.
thanks


Share |
oppdelta
General Member
Since: Jun 3, 2007
Posts: 143
Last: Apr 27, 2011
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Tuesday, Jan. 26, 2010 01:32 am
Here's the, Rifle Only, cvars set.

Code:
main()
{
 thread weapons_rifleonly();
}

weapons_rifleonly()
{
	
	setCvar("scr_allow_flamethrower", "0");
	setCvar("scr_allow_bazooka", "0");
	setCvar("scr_allow_panzerfaust", "0");
	setCvar("scr_allow_enfield", "1");
	setCvar("scr_allow_nagant", "1");
	setCvar("scr_allow_kar98k", "1");
	setCvar("scr_allow_springfield", "1");
	setCvar("scr_allow_nagantsniper", "1");
	setCvar("scr_allow_kar98ksniper", "1");
	setCvar("scr_allow_bar", "0");
	setCvar("scr_allow_fg42", "0");
	setCvar("scr_allow_m1carbine", "0");
	setCvar("scr_allow_m1garand", "0");
	setCvar("scr_allow_gewehr43", "0");
	setCvar("scr_allow_thompson", "0");
	setCvar("scr_allow_sten", "0");
	setCvar("scr_allow_bren", "0");
	setCvar("scr_allow_ppsh", "0");
	setCvar("scr_allow_mp40", "0");
	setCvar("scr_allow_mp44", "0");
	setCvar("scr_allow_mg34", "0");
	setCvar("scr_allow_dp28", "0");
	setCvar("scr_allow_mg30cal", "0");
	setCvar("scr_allow_svt40", "0");
	setCvar("scr_allow_pistols", "1");
	setCvar("scr_allow_satchel", "1");
	setCvar("scr_allow_smoke", "1");
	setCvar("scr_allow_grenades", "1");
	setCvar("scr_allow_artillery", "1");
	setCvar("scr_allow_binoculars", "1");
	wait 0.1;
}
Share |
morgawr
General Member
Since: Dec 15, 2004
Posts: 374
Last: Oct 7, 2021
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Tuesday, Jan. 26, 2010 10:14 am
Bad syntax, is comming up at the moment
will study script after work :)
Thanks for the help
Share |
morgawr
General Member
Since: Dec 15, 2004
Posts: 374
Last: Oct 7, 2021
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Tuesday, Jan. 26, 2010 03:05 pm
Works perfect,
I took my script out and left yours in,
worked 1st time lol,
so whilst my script worked fine it seems I need to clean it up
or just add the right { } to the right places.
Thanks, this is a fantastic script and will see a few maps reworked :)

This still give me bad syntax ?

main()
{

setCullFog (0, 9000, .32, .36, .40, 0);
ambientPlay("ambient_mp_chateau");

maps\mp\_load::main();
maps\mp\_flak_gmi::main();

level thread maps\mp\_tankdrive_gmi::main();
level thread maps\mp\_jeepdrive_gmi::main();
level thread maps\mp\_flak_gmi::main();//for flak88s

game["allies"] = "russian";
game["axis"] = "german";

game["hud_allies_victory_image"] = "gfx/hud/hud@mp_victory_german.dds";
game["hud_axis_victory_image"] = "gfx/hud/hud@mp_victory_russian.dds";

game["attackers"] = "allies";
game["defenders"] = "axis";

game["allies"] = "russian";
game["axis"] = "german";

}

thread weapons_rifleonly();

{

weapons_rifleonly()

}

setCvar("scr_allow_flamethrower", "0");
setCvar("scr_allow_bazooka", "0");
setCvar("scr_allow_panzerfaust", "0");
setCvar("scr_allow_enfield", "1");
setCvar("scr_allow_nagant", "1");
setCvar("scr_allow_kar98k", "1");
setCvar("scr_allow_springfield", "1");
setCvar("scr_allow_nagantsniper", "1");
setCvar("scr_allow_kar98ksniper", "1");
setCvar("scr_allow_bar", "0");
setCvar("scr_allow_fg42", "0");
setCvar("scr_allow_m1carbine", "0");
setCvar("scr_allow_m1garand", "0");
setCvar("scr_allow_gewehr43", "0");
setCvar("scr_allow_thompson", "0");
setCvar("scr_allow_sten", "0");
setCvar("scr_allow_bren", "0");
setCvar("scr_allow_ppsh", "0");
setCvar("scr_allow_mp40", "0");
setCvar("scr_allow_mp44", "0");
setCvar("scr_allow_mg34", "0");
setCvar("scr_allow_dp28", "0");
setCvar("scr_allow_mg30cal", "0");
setCvar("scr_allow_svt40", "0");
setCvar("scr_allow_pistols", "1");
setCvar("scr_allow_satchel", "1");
setCvar("scr_allow_smoke", "1");
setCvar("scr_allow_grenades", "1");
setCvar("scr_allow_artillery", "1");
setCvar("scr_allow_binoculars", "1");
wait 0.1;

{
Share |
oppdelta
General Member
Since: Jun 3, 2007
Posts: 143
Last: Apr 27, 2011
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Tuesday, Jan. 26, 2010 09:08 pm
Your { } were the wrong way round =P

Anyway, there ya go.

Code:
main()
{

setCullFog (0, 9000, .32, .36, .40, 0);
ambientPlay("ambient_mp_chateau");

maps\mp\_load::main();
maps\mp\_flak_gmi::main();

level thread maps\mp\_tankdrive_gmi::main();
level thread maps\mp\_jeepdrive_gmi::main();

game["allies"] = "russian";
game["axis"] = "german";

game["hud_allies_victory_image"] = "gfx/hud/hud@mp_victory_german.dds";
game["hud_axis_victory_image"] = "gfx/hud/hud@mp_victory_russian.dds";

game["attackers"] = "allies";
game["defenders"] = "axis";

game["allies"] = "russian";
game["axis"] = "german";

thread weapons_rifleonly();
}

weapons_rifleonly()
{
setCvar("scr_allow_flamethrower", "0");
setCvar("scr_allow_bazooka", "0");
setCvar("scr_allow_panzerfaust", "0");
setCvar("scr_allow_enfield", "1");
setCvar("scr_allow_nagant", "1");
setCvar("scr_allow_kar98k", "1");
setCvar("scr_allow_springfield", "1");
setCvar("scr_allow_nagantsniper", "1");
setCvar("scr_allow_kar98ksniper", "1");
setCvar("scr_allow_bar", "0");
setCvar("scr_allow_fg42", "0");
setCvar("scr_allow_m1carbine", "0");
setCvar("scr_allow_m1garand", "0");
setCvar("scr_allow_gewehr43", "0");
setCvar("scr_allow_thompson", "0");
setCvar("scr_allow_sten", "0");
setCvar("scr_allow_bren", "0");
setCvar("scr_allow_ppsh", "0");
setCvar("scr_allow_mp40", "0");
setCvar("scr_allow_mp44", "0");
setCvar("scr_allow_mg34", "0");
setCvar("scr_allow_dp28", "0");
setCvar("scr_allow_mg30cal", "0");
setCvar("scr_allow_svt40", "0");
setCvar("scr_allow_pistols", "1");
setCvar("scr_allow_satchel", "1");
setCvar("scr_allow_smoke", "1");
setCvar("scr_allow_grenades", "1");
setCvar("scr_allow_artillery", "1");
setCvar("scr_allow_binoculars", "1");
wait 0.1;

}
Share |
morgawr
General Member
Since: Dec 15, 2004
Posts: 374
Last: Oct 7, 2021
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Wednesday, Jan. 27, 2010 01:37 am
Thanks again
working perfect.
and with this script rifle mods are not needed.
just make a normal map and a rifles only version

Share |
oppdelta
General Member
Since: Jun 3, 2007
Posts: 143
Last: Apr 27, 2011
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Wednesday, Jan. 27, 2010 08:51 am
No Prob. Good luck with the map [jumping]

Share |
morgawr
General Member
Since: Dec 15, 2004
Posts: 374
Last: Oct 7, 2021
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Saturday, Jan. 30, 2010 12:52 am
This script works great,
but at last I got time to play on my server
I see it effects every map not just the map with the script in it.
can I prevent this from happening as it stands I cannnot use it on my server.
I only want the script to work for the map I add the the script to the gsc
Share |
oppdelta
General Member
Since: Jun 3, 2007
Posts: 143
Last: Apr 27, 2011
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Saturday, Jan. 30, 2010 01:23 am
It sets all the rcon cvars. If you own the server, in the serverconfig add this...restart ya server. Have fun ^^

set scr_allow_flamethrower "1"
set scr_allow_bazooka "1"
set scr_allow_panzerfaust "1"
set scr_allow_enfield "1"
set scr_allow_nagant "1"
set scr_allow_kar98k "1"
set scr_allow_springfield "1"
set scr_allow_nagantsniper "1"
set scr_allow_kar98ksniper "1"
set scr_allow_bar "1"
set scr_allow_fg42 "1"
set scr_allow_m1carbine "1"
set scr_allow_m1garand "1"
set scr_allow_gewehr43 "1"
set scr_allow_thompson "1"
set scr_allow_sten "1"
set scr_allow_bren "1"
set scr_allow_ppsh "1"
set scr_allow_mp40 "1"
set scr_allow_mp44 "1"
set scr_allow_mg34 "1"
set scr_allow_dp28 "1"
set scr_allow_mg30cal "1"
set scr_allow_svt40 "1"
set scr_allow_pistols "1"
set scr_allow_satchel "1"
set scr_allow_smoke "1"
set scr_allow_grenades "1"
set scr_allow_artillery "1"
set scr_allow_binoculars "1"
Share |
morgawr
General Member
Since: Dec 15, 2004
Posts: 374
Last: Oct 7, 2021
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Saturday, Jan. 30, 2010 02:42 am
Yep, I already have this set on my dediacted.cfg
and I have the rifles only script added to the maps gsc file that I want to play rifles only.

but the one map with the rifles only script forces all other maps to act as rifles only.

how can I prevent this from happening.
Share |
Restricted Access Topic is Locked
Page
Next Page
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

»