that looks right for the most part, but i didnt' check every bracket and stuff.
but if you look at the old mod, you will see other files that are included in the mod besides the scriptmenus. there should be a file called _teams like general was saying.
/maps/mp/gametypes/_teams.gsc (i think)
scroll through that file till you find this part. sorry i dont have a clean file. i'm working on my sisters computer with a downloaded mod i made.
Code:
case "american":
game["headicon_allies"] = "gfx/hud/headicon@american.tga";
//precacheShader("gfx/hud/hud@mpflag_american.tga");
precacheItem("fraggrenade_mp");
precacheItem("smokegrenade_mp");
precacheItem("flashgrenade_mp");
precacheItem("colt_mp");
precacheItem("m1carbine_mp");
precacheItem("m1garand_mp");
precacheItem("thompson_mp");
precacheItem("bar_mp");
precacheItem("springfield_mp");
precacheItem("mg30cal_mp");
precacheItem("binoculars_mp");
precacheItem("binoculars_artillery_mp");
precacheItem("satchelcharge_mp");
precacheItem("mosin_nagant_mp");
precacheItem("kar98k_mp");
break;
if you notice you have to precache all the weapons you want the specified team to be able to use. so you need to add the snipers to the precache list for the americans, russians, british and germans. just copy and paste ones you need.
further down through _teams.gsc you find this part.
Code:
restrict(response)
{
if(self.pers["team"] == "allies")
{
switch(game["allies"])
{
case "american":
switch(response)
{
case "m1carbine_mp":
if(!getcvar("scr_allow_m1carbine"))
{
self iprintln(&"MPSCRIPT_M1A1_CARBINE_IS_A_RESTRICTED");
response = "restricted";
}
break;
case "m1garand_mp":
if(!getcvar("scr_allow_m1garand"))
{
self iprintln(&"MPSCRIPT_M1_GARAND_IS_A_RESTRICTED");
response = "restricted";
}
break;
case "thompson_mp":
if(!getcvar("scr_allow_thompson"))
{
self iprintln(&"MPSCRIPT_THOMPSON_IS_A_RESTRICTED");
response = "restricted";
}
break;
case "bar_mp":
if(!getcvar("scr_allow_bar"))
{
self iprintln(&"MPSCRIPT_BAR_IS_A_RESTRICTED_WEAPON");
response = "restricted";
}
break;
case "springfield_mp":
if(!getcvar("scr_allow_springfield"))
{
self iprintln(&"MPSCRIPT_SPRINGFIELD_IS_A_RESTRICTED");
response = "restricted";
}
break;
case "mg30cal_mp":
if(!getcvar("scr_allow_mg30cal"))
{
self iprintln(&"GMI_WEAPON_30CAL_IS_A_RESTRICTED");
response = "restricted";
}
break;
case "mosin_nagant_mp":
if(!getcvar("scr_allow_nagant"))
{
self iprintln(&"MPSCRIPT_MOSINNAGANT_IS_A_RESTRICTED");
response = "restricted";
}
break;
case "kar98k_mp":
if(!getcvar("scr_allow_kar98k"))
{
self iprintln(&"MPSCRIPT_KAR98K_IS_A_RESTRICTED");
response = "restricted";
}
break;
default:
self iprintln(&"MPSCRIPT_UNKNOWN_WEAPON_SELECTED");
response = "restricted";
}
break;
u can see that i added the kar and nagant to the american section. u need to add the weapons (sniper rifles) to each teams section. it should be pretty easy to figure out using the examples i posted.
i think the last thing to change is this part
Code:
isweaponavailable(team)
{
if(team == "allies")
{
switch(game["allies"])
{
case "american":
if(level.allow_m1carbine == "1")
return true;
if(level.allow_m1garand == "1")
return true;
if(level.allow_thompson == "1")
return true;
if(level.allow_bar == "1")
return true;
if(level.allow_springfield == "1")
return true;
if(level.allow_mg30cal == "1")
return true;
if(level.allow_nagant == "1")
return true;
if(level.allow_kar98k == "1")
return true;
return false;
break;
u should see the pattern now of what needs to be done. sorry my post waas so messy and fast. i'm at public internet and have limited time.
here is a mod i made you can look through if you need to for ideas or whatever. or you can just add your guns to it if you like. feel free use any part of it. i think general99 taught me how to make that mod. oh and eggbeast too. ;)
http://revolutionboy.com/cod/xm-mod/zz_xm_riflemod.pk3