Call of Duty 2

Hier findest Du einige Scripte, die ich mithilfe anderer grossartiger Scripter geändert und zusammengetragen habe. Desweiteren finden sich hier diverse Anleitungen, die für Serveradmins gedacht sind.

Waffen aus Map entfernen

Es gibt in einigen Maps teilweise riesige Waffenarsenale, die der Mapper versteckt hat. Das kann bei einem Rifle only Server natürlich sehr störend sein, deshalb zeige ich, wie man die Waffen entfernen kann. Das Script basiert auf der Idee von bangingbernie aus dem [OL] Forum.

Zuerst muss man die map.iwd öffnen und sich das Mapscript extrahieren. Man findet es unter /maps/mp/ Die Datei heisst genauso, wie die Map (= Konsolenname). Dem Mapscript fügt man nun den Aufruf zu einer neuen Datei hinzu und speichert es unter obiger Ordnerstruktur auf dem Server wieder. In dasselbe Verzeichnis kommt nun eine neue Datei mit folgendem Inhalt:

_remove_weapons.gsc

Code eingefügt.
main(){
 
    Remove_30cal_prone();
    Remove_30cal_stand();
    Remove_bar();
    Remove_bren();
    Remove_colt();
    Remove_enfield();
    Remove_enfield_scope();
    Remove_g43();
    Remove_greasgun();
    Remove_kar98k();
    Remove_kar98k_sniper();
    Remove_luger();
    Remove_m1carbine();
    Remove_m1garand();
    Remove_mg42_bipod_duck();
    Remove_mg42_bipod_prone();
    Remove_mg42_bipod_stand();
    Remove_mosin_nagant();
    Remove_mosin_nagant_sniper();
    Remove_mp40();
    Remove_mp44();
    Remove_panzerfaust();
    Remove_panzerschreck();
    Remove_pps42();
    Remove_ppsh();
    Remove_shotgun();
    Remove_springfield();
    Remove_sten();
    Remove_svt40();
    Remove_thompson();
    Remove_tt30();
    Remove_webley();
}
 
Remove_30cal_prone(){
 
    weapons = getentarray("weapon_30cal_prone_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_30cal_stand(){
 
    weapons = getentarray("weapon_30cal_stand_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_bar(){
 
    weapons = getentarray("weapon_bar_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_bren(){
 
    weapons = getentarray("weapon_bren_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_colt(){
 
    weapons = getentarray("weapon_colt_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_enfield(){
 
    weapons = getentarray("weapon_enfield_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_enfield_scope(){
 
    weapons = getentarray("weapon_enfield_scope_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_g43(){
 
    weapons = getentarray("weapon_g43_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_greasgun(){
 
    weapons = getentarray("weapon_greasgun_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_kar98k(){
 
    weapons = getentarray("weapon_kar98k_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_kar98k_sniper(){
 
    weapons = getentarray("weapon_kar98k_sniper_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_luger(){
 
    weapons = getentarray("weapon_luger_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_m1carbine(){
 
    weapons = getentarray("weapon_m1carbine_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_m1garand(){
 
    weapons = getentarray("weapon_m1garand_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_mg42_bipod_duck(){
 
    weapons = getentarray("weapon_mg42_bipod_duck_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_mg42_bipod_prone(){
 
    weapons = getentarray("weapon_mg42_bipod_prone_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_mg42_bipod_stand(){
 
    weapons = getentarray("weapon_mg42_bipod_stand_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_mosin_nagant(){
 
    weapons = getentarray("weapon_mosin_nagant_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_mosin_nagant_sniper(){
 
    weapons = getentarray("weapon_mosin_nagant_sniper_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_mp40(){
 
    weapons = getentarray("weapon_mp40_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_mp44(){
 
    weapons = getentarray("weapon_mp44_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_panzerfaust(){
 
    weapons = getentarray("weapon_panzerfaust_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_panzerschreck(){
 
    weapons = getentarray("weapon_panzerschreck_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_pps42(){
 
    weapons = getentarray("weapon_pps42_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_ppsh(){
 
    weapons = getentarray("weapon_ppsh_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_shotgun(){
 
    weapons = getentarray("weapon_shotgun_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_springfield(){
 
    weapons = getentarray("weapon_springfield_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_sten(){
 
    weapons = getentarray("weapon_sten_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_svt40(){
 
    weapons = getentarray("weapon_svt40_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_thompson(){
 
    weapons = getentarray("weapon_thompson_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_tt30(){
 
    weapons = getentarray("weapon_tt30_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}
 
Remove_webley(){
 
    weapons = getentarray("weapon_webley_mp","classname");
     
    for(i=0;i<weapons.size;i++){
     
        weapons[i] delete();
    }
}

und das geänderte Mapscript, hier im Beispiel gob_rats.gsc:

gob_rats.gsc

Code eingefügt.
main(){
 
    maps\mp\_load::main();
 
    // set fog. density, red, green, blue, alpha
    setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
 
    // set background ambient noise
    ambientPlay("ambient_france");
 
    // set nationalities of allies and axis
    game["allies"] = "british"; // or british or russian
    game["axis"] = "german";
 
    setcvar("r_glowbloomintensity0","1");
    setcvar("r_glowbloomintensity1","1");
    setcvar("r_glowskybleedintensity0",".25");
 
    // set who does what in SD
 
    game["attackers"] = "allies";
    game["defenders"] = "axis";
 
    // set the way allies and axis look
    // possible values are:
    // for american: normandy
    // for british: normandy, africa
    // for russian: coats, padded
    // for german: normandy, africa, winterlight, winterdark
 
    game["british_soldiertype"] = "normandy";
    game["german_soldiertype"] = "normandy";
 
    // Remove Weapons
        thread maps\mp\_remove_weapons::main();
}

Zurück