Thread: Isnipe Anticamp

Results 1 to 2 of 2
  1. #1
    mrhackera's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Location
    Inside a Vodka bottle
    Posts
    7
    Reputation
    10
    Thanks
    1
    My Mood
    Inspired

    Unhappy Isnipe Anticamp

    Hello Mpgh ;DHello Mpgh ;D

    I need help with one thing and its the following from isnipe 3 i saw the new anticamp system that i wanted to add to my isnipe but i dont know how. need help with one thing and its the following from isnipe 3 i saw the new anticamp system that i wanted to add to my isnipe but i dont know how.

    This Is the gs utility from my isnipe

    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;

    /*
    isnipe v3.1 by [AAE] Clan (rewritten v3)
    credits to Ninja
    */

    init()
    {
    /*--------Put dvars here for private match!------*/

    //custom isnipe Dvars
    setDvarIfUninitialized( "allow_tknife", 1 );
    setDvarIfUninitialized( "tknife_round", 0 );
    setDvarIfUninitialized( "anti_camp", 0 );
    setDvarIfUninitialized( "anti_hs", 1 );
    setDvarIfUninitialized( "anti_crns", 1 );
    setDvarIfUninitialized( "slowmo_cam", 1 );
    setDvarIfUninitialized( "show_alive", 1 );
    setDvarIfUninitialized( "show_top", 1 );
    setDvarIfUninitialized( "show_streak", 1 );
    setDvarIfUninitialized( "show_rank", 1 );
    setDvarIfUninitialized( "costum_streaks", 1 );
    setDvarIfUninitialized( "isnipe_serverIP", "193.192.58.211" );

    //DEVELOPER SETTINGS
    level.SpawnBots = false; //Will spawn bots

    //Throwing knife round (2st)
    level.allowthrowingknife = GetDvarInt( "allow_tknife" );
    level.knifeFirstRound = GetDvarInt( "tknife_round" );

    //'ANTI' STUFF
    level.antiCamp = GetDvarInt( "anti_camp" );
    level.MaxCampTime = 15;

    level.antiHardScope = GetDvarInt( "anti_hs" );
    level.MaxScopeTime = 0.20;

    level.antiCRNS = GetDvarInt( "" );


    //HUD-Stuff & Killcam
    level.showAliveCounter = GetDvarInt( "show_alive" );
    level.ShowTopPlayer = GetDvarInt( "show_top" );
    level.showKillstreak = GetDvarInt( "show_streak" );
    level.showrankIcon = GetDvarInt( "show_rank" );
    level.slowmoKillcam = GetDvarInt( "slowmo_cam" );
    level.customStreaks = GetDvarInt( "costum_streaks" );

    //server IP
    level.serverIP = GetDvarInt( "isnipe_serverIP" );

    //Teamnames
    level.teamnameAllies = "^0Clan ^6AAE ^21";
    level.teamnameAxis = "N^0oo^6b Team";

    //com_maxfps
    level.forceMaxFPS = false;
    level.MaxFPS = 0; //0 = unlocked/infinite -- otherwise a number above 60 is recommended


    //gametype specific settings (DONT TOUCH!)
    if( level.gametype != "sd" && level.gametype != "sab" ) //alive counter only in round-based gamemodes
    level.showAliveCounter = true;
    else
    level.showAliveCounter = GetDvarInt( "show_alive" );

    if( level.gametype != "sd" )
    {
    level.knifeFirstRound = false;
    }

    if(!level.allowthrowingknife)
    level.knifeFirstRound = false;

    //server Dvars

    setDvar( "cl_maxpackets", 100);
    setDvar( "player_breath_fire_delay ", "0" );
    setDvar( "player_breath_gasp_lerp", "0" );
    setDvar( "player_breath_gasp_scale", "0.0" );
    setDvar( "player_breath_gasp_time", "0" );
    setDvar( "player_breath_snd_delay ", "0" );
    setDvar( "perk_extraBreath", "0" );
    setDvar( "perk_improvedextraBreath", "0" );
    //setDvar( "ui_hud_showdeathicons", 0 );
    //setDvar( "scr_showperksonspawn", 0 );

    setDvar("bg_fallDamageMinHeight", 9998);
    setDvar("bg_fallDamageMaxHeight", 9999);
    setDvar("perk_weapSpreadMultiplier", 0.45);
    setDvar("perk_fastSnipeScale", 3);
    setDvar("cg_drawBreathHint", 0);

    //remove Turrets
    level deletePlacedEntity("misc_turret");

    level thread onPlayerConnect();
    }

    onPlayerConnect()
    {
    level endon( "game_ended" );
    for(;
    {
    level waittill( "connected", player );
    player thread onPlayerSpawned();
    player thread playerHostShow(player);
    }
    }

    onPlayerSpawned()
    {
    self endon( "disconnect" );

    for(;
    {
    self waittill( "spawned_player" );

    self.usingStreak = 0;
    self.AoEactive = 0;

    if ( game["roundsPlayed"] == 0 && level.knifeFirstRound )
    self thread doKnife();

    if( level.showAliveCounter )
    self thread showAlive();

    if ( level.antiHardScope )
    self thread EnableAntiHardScope(level.MaxScopeTime);

    if ( level.antiCamp )
    self thread AntiCamp(level.MaxCampTime, 300);

    if ( level.ShowTopPlayer )
    self thread doTopPlayerHUD();

    if( level.spawnBots )
    self thread maps\mp\gametypes\bots::SpawnBots(17);

    //self thread ChangeAppearance();

    self thread CreateLabel("^9Abusive ^6Aback ^1Enforcers ^8Isnipe!! ", "TOPMIDDLE", "TOPMIDDLE", 0, 0, "hudbig", 0.6);
    self thread CreateLabel("Owner Matilone & BjSexy", "TOPRIGHT", "TOPRIGHT", -5, 0, "hudbig", 0.6);
    self thread maps\mp\gametypes\_hud_message::hintMessage("AAE] ^2 Abusive Aback Enforcers ^3i^5Snipe ^6 ** FPS BOOST **");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^0We ^2Recruit ! ");
    self thread maps\mp\gametypes\_hud_message::hintMessage("Mod Made By ^3[AAE] ^5Ninja.. Enjoy!");

    ;
    self doDvars();




    self thread CreateLabel("", "TOPRIGHT", "TOPRIGHT", -5, 0, "hudbig", 0.6);
    self thread destroyInKillcam();

    self doDvars();
    }
    }

    /*ChangeAppearance(Type,MyTeam)
    {
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "changed_app" );
    ModelType];
    ModelType[0]="GHILLIE";
    ModelType[1]="SNIPER";
    ModelType[2]="LMG";
    ModelType[3]="ASSAULT";
    ModelType[4]="SHOTGUN";
    ModelType[5]="SMG";
    ModelType[6]="RIOT";

    if(Type==7)
    {
    MyTeam=randomint(2);
    Type=randomint(7);
    }

    team=get_enemy_team(self.team);

    if(MyTeam)team=self.team;

    self detachAll();
    [[game[team+"_model"][ModelType[0]]]]();

    self notify( "changed_app" );
    }*/

    destroyInKillcam()
    {
    self endon("disconnect");

    for(;
    {
    if(level.showingFinalKillcam)
    {
    self.sap destroy();
    self.topplayerstitle destroy();
    self.topone destroy();
    self.ShowKS destroy();
    self.streakIcon destroy();
    self.streakInstruct destroy();
    self.aTimer1 destroy();
    self.aTimer2 destroy();
    self.aTimer3 destroy();
    }
    wait .05;
    }
    }


    //---Anti-HS by maxmito modified by banz---//
    EnableAntiHardScope(time)
    {
    self endon( "disconnect" );
    self endon( "death" );

    if( !isDefined( time ) || time < 0.05 )
    time = 3;

    adsTime = 0;

    for( ;; )
    {

    //Anti-HS only for Intervention (ignore Deagle)
    if(!IsSubStr( self getCurrentWeapon(), "cheytac" )) {
    adsTime = 0;
    self waittill( "weapon_change");
    }

    if( self playerAds() == 1 )
    adsTime ++;
    else
    adsTime = 0;

    if( adsTime >= int( time / 0.05 ) )
    {
    adsTime = 0;
    self allowAds( false );

    while( self playerAds() > 0 )
    wait( 0.05 );

    self allowAds( true );
    }


    wait( 0.05 );

    }
    }


    playerHostShow(player)
    {
    self endon("disconnect");
    self endon("game_ended");


    player notifyOnPlayerCommand("showHost", "+scores");
    player notifyOnPlayerCommand("hideHost", "-scores");


    player.privateclients = getDvarInt("sv_privateclients");
    player.publicclients = getDvarInt("sv_maxclients");


    if (isDefined(player.hostname))
    player.hostname destroy();

    if (isDefined(player.ip))
    player.ip destroy();

    if (isDefined(player.playersingame))
    player.playersingame destroy();

    for(;
    {
    player waittill("showHost");

    player.hostname = player createFontString("normalbold", 0.9);
    player.hostname setPoint("BOTTOMLEFT", "BOTTOMLEFT", 85, -30);
    player.hostname setText(level.hostname);

    player.playersingame = player createFontString("normalbold", 0.9);
    player.playersingame setPoint("BOTTOMLEFT", "BOTTOMLEFT", 85, -20);
    player.playersingame setText( "Players: ^3" + level.players.size + "/" + (player.privateclients + player.publicclients));

    player.ip = player createFontString("normalbold", 0.9);
    player.ip setPoint("BOTTOMRIGHT", "BOTTOMRIGHT", -85, -30);
    player.ip setText( level.serverIP + ":" + getDvar( "net_port" ) );

    player waittill("hideHost");

    player.hostname destroy();
    player.ip destroy();
    player.playersingame destroy();

    player.hostname = undefined;
    player.ip = undefined;
    player.playersingame = undefined;
    }
    }


    doDvars()
    {
    self setClientDvar( "cl_maxpackets", 100 );
    //self setClientDvar( "snd_cinematicVolumeScale", 0 ); //no Music
    self setClientDvar( "cg_viewzsmoothingmin", 1 );
    self setClientDvar( "cg_viewzsmoothingmax", 16 );
    self setClientDvar( "cg_viewzsmoothingtime", 0.1 );
    self setClientDvar( "cg_huddamageiconheight", 64 );
    self setClientDvar( "cg_huddamageiconwidth", 128 );
    self setClientDvar( "waypointiconheight", 15 );
    self setClientDvar( "waypointiconwidth", 15 );
    self setClientDvar( "cg_drawBreathHint", 0 );
    self setClientDvar( "perk_weapSpreadMultiplier", 0.45 );
    self setClientDvar( "cg_drawThroughWalls", 0 );
    self setClientDvar( "cg_enemyNameFadeIn", 1 );
    self setClientDvar( "cg_enemyNameFadeOut", 1 );

    //Stock Dvars
    self SetClientDvar( "lowAmmoWarningColor1", "0 0 0 0" );
    self SetClientDvar( "lowAmmoWarningColor2", "0 0 0 0" );
    self SetClientDvar( "lowAmmoWarningNoAmmoColor1", "0 0 0 0" );
    self SetClientDvar( "lowAmmoWarningNoAmmoColor2", "0 0 0 0" );
    self SetClientDvar( "lowAmmoWarningNoReloadColor1", "0 0 0 0" );
    self SetClientDvar( "lowAmmoWarningNoReloadColor2", "0 0 0 0" );

    if(level.forceMaxFps)
    self setClientDvar("com_maxfps", level.MaxFPS);
    }


    CreateLabel(modname, locationX, locationY, marginX, marginY, font, fontsize)
    {
    self endon("disconnect");
    self endon("label_done");
    Label = self createFontString(font, fontsize);
    self thread deleteondeath(Label);
    Label setPoint(locationX, locationY, marginX, marginY);
    Label setText(modname);
    Label.alpha = 1;
    wait 10;

    for( i = 1; i > 0; i -=0.05) {
    Label.alpha = i;
    wait 0.05;
    }
    Label destroy();
    self notify("label_done");
    }

    showAlive()
    {
    self endon("death");
    self endon("disconnect");
    alive_attackers = level.aliveCount[ game["attackers"] ];
    alive_defenders = level.aliveCount[ game["defenders"] ];

    self.sap = self createFontString("hudbig", 0.8);
    self.sap setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -132, -12);

    self.sap.hidewheninmenu = true;
    self thread deleteondeath(self.sap);

    while( game["state"] == "playing" && game[ "state" ] != "postgame" && !isInKillcam() )
    {
    alive_attackers = level.aliveCount[ game["attackers"] ];
    alive_defenders = level.aliveCount[ game["defenders"] ];

    if (self.pers["team"] == game["attackers"])
    self.sap setText("^2" + alive_attackers+ " ^1" +alive_defenders);

    else if (self.pers["team"] == game["defenders"])
    self.sap setText("^2" + alive_defenders+ " ^1" +alive_attackers);

    wait 0.1;
    }

    self.sap destroy();
    }



    doKnife()
    {
    self endon("disconnect");
    self endon("death");
    self endon("knife_done");

    self takeAllWeapons();
    self giveWeapon( "usp_tactical_mp", 1, true );
    self setWeaponAmmoClip( "usp_tactical_mp", 1 );
    self setWeaponAmmoStock( "usp_tactical_mp", 1 );
    self setSpawnWeapon( "usp_tactical_mp" );
    self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );

    while( !gameFlag( "prematch_done" ) )
    wait .05;

    self thread restockKnife();

    for (i=0; i < 4; i++)
    {
    self iPrintLnBold("^0Thats ^6how ^0we ^6Roll ^0the ^6Dices. 0");
    wait 1.5;
    }
    self notify("knife_done");
    }


    //---restock throwing knife 1 seconds after thrown it (no spamming) ---// (knife round only)
    restockKnife()
    {
    self endon("disconnect");
    self endon("death");

    for(;
    {
    self waittill( "grenade_fire", grenade, weaponName );
    wait 1.0;

    if ( weaponName == "throwingknife_mp") {
    if( self getWeaponAmmoClip( "throwingknife_mp" ) == 0)
    self setWeaponAmmoClip( "throwingknife_mp", 1 );
    }
    }
    }

    //---get player with best K/D ratio by banz---//

    getBestPlayer()
    {
    best = [];
    foreach ( player in level.players )
    {

    if (player getPlayerStat( "deaths" ) == 0)
    kdratio = ( player getPlayerStat( "kills" ) );
    else
    kdratio = ( player getPlayerStat( "kills" ) ) / ( player getPlayerStat( "deaths" ) );

    if( !isDefined(best["KD"]) )
    best["KD"] = 0;

    if( !isDefined(best["player"]) )
    best["player"] = player.name;

    if( kdratio > best["KD"] ) {
    best["KD"] = kdratio;
    best["player"] = player.name;
    }

    }
    return best;
    }

    //---show player with best K/D ratio by banz---//

    doTopPlayerHUD()
    {
    self endon("disconnect");
    self endon("death");

    self.topplayerstitle = self createFontString("hud", 1);
    self.topplayerstitle setPoint("CENTERRIGHT", "CENTERRIGHT", -5, 0);

    self.topone = self createFontString("hud", 0.9);
    self.topone setPoint("CENTERRIGHT", "CENTERRIGHT", -5, 12);

    self.topplayerstitle.hideWhenInMenu = true;
    self.topone.hideWhenInMenu = true;

    self thread deleteondeath(self.topplayerstitle);
    self thread deleteondeath(self.topone);

    for(;
    {
    top = self getBestPlayer();
    if (top["KD"] != 0)
    {
    self.topplayerstitle setText("AAE ^1TOP ^3PLAYER");
    self.topone setText("^2" + top ["player"] + " K/D: " +top["KD"]);
    }
    wait 0.5;
    }
    }

    //---Anti-Camp by banz---//
    AntiCamp(waitTime, longDistance)
    {
    self endon("disconnect");
    self endon("death");

    if( !isDefined(waitTime) )
    waiTime = 12;

    if( !isDefined(longDistance) )
    longDistance = 300;

    while( !gameFlag( "prematch_done" ) )
    wait .05;

    if ( !isSubStr( self.guid, "bot") ) { //ignore bots


    for(;
    {
    self thread monitorTravelledDistance(300);
    wait waitTime;
    self notify("checked_travel");

    if( ( self.travelled < longDistance) || distance( self.startpos, self.origin) < 120 ) {

    self thread monitorTravelledDistance(150);
    for( i=6; i>0; i--) {
    self iPrintLnBold("AAE Anticamp" );
    wait 1;

    if( !isAlive( self ) || game["state"] != "playing" || self.usingStreak == 1 ) {
    self notify("checked_travel");
    break;
    }

    if(self.hastravelled) {
    self notify("checked_travel");
    break;
    }
    }
    if( !self.hastravelled && isAlive( self ) && game["state"] == "playing" && self.usingStreak != 1 )
    self suicide();

    self notify("checked_travel");
    }
    }
    }
    }

    //---monitors distance the player moves---//
    monitorTravelledDistance(shortDistance)
    {
    self endon("disconnect");
    self endon("death");
    self endon("checked_travel");
    self.travelled = 0;
    self.hastravelled = false;
    self.startpos = self.origin;
    self.prevpos = self.origin;

    if( !isDefined(shortDistance) )
    shortDistance = 100;

    for(;
    {
    wait .1;

    self.travelled += distance( self.origin, self.prevpos );
    self.prevpos = self.origin;

    if (self.travelled >= shortDistance)
    self.hastravelled = true;
    }
    }


    deleteOnDeath( hud )
    {
    self waittill("death");
    hud destroy();
    }

    And This is the new anticamp thats from isnipe 3 This is the anticamp thats from isnipe 3


    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;

    InitAntiCamp(MaxCampTime)
    {

    if (level.anticampinitialized != 1)
    {
    level.anticampinitialized = 1;
    level.campers = [];
    level.campers[1] = "";
    level.campers[2] = "";
    level.campers[3] = "";
    level.campers[4] = "";
    level.campers[5] = "";
    self.campernumber = 0;
    level.camperstimeleft = [];
    }
    self thread DoHUD();
    self thread maps\mp\isnipe\extras\anticamp::RemoveSelfFromList OnDeath();
    self maps\mp\isnipe\extras\anticamp::EnableAntiCamp(Max CampTime);

    }

    DoHUD()
    {
    self endon("death");

    campers = self createFontString("hud", 1);
    campers setPoint("CENTERLEFT", "CENTERLEFT", 10, -25);

    camperone = self createFontString("hud", 0.9);
    camperone setPoint("CENTERLEFT", "CENTERLEFT", 10, -15);

    campertwo = self createFontString("hud", 0.9);
    campertwo setPoint("CENTERLEFT", "CENTERLEFT", 10, -5);

    camperthree = self createFontString("hud", 0.9);
    camperthree setPoint("CENTERLEFT", "CENTERLEFT", 10, 5);

    camperfour = self createFontString("hud", 0.9);
    camperfour setPoint("CENTERLEFT", "CENTERLEFT", 10, 15);

    camperfive = self createFontString("hud", 0.9);
    camperfive setPoint("CENTERLEFT", "CENTERLEFT", 10, 25);

    campers setText("");

    self thread deleteondeath(campers);
    self thread deleteondeath(camperone);
    self thread deleteondeath(campertwo);
    self thread deleteondeath(camperthree);
    self thread deleteondeath(camperfour);
    self thread deleteondeath(camperfive);

    campers.hideWhenInMenu = true;
    camperone.hideWhenInMenu = true;
    campertwo.hideWhenInMenu = true;
    camperthree.hideWhenInMenu = true;
    camperfour.hideWhenInMenu = true;
    camperfive.hideWhenInMenu = true;

    for(;
    {

    if (level.camperstimeleft[1] == "" && level.camperstimeleft[2] == "" && level.camperstimeleft[3] == "" && level.camperstimeleft[4] == "" && level.camperstimeleft[5] == "")
    {
    campers setText("");
    } else {
    campers setText("^1ANTICAMP");
    }


    if (level.camperstimeleft[1] == "")
    {
    camperone setText("");

    } else {
    camperone setText(level.campers[1] + " ^3(" + level.camperstimeleft[1] + ")");
    }

    if (level.camperstimeleft[2] == "")
    {
    campertwo setText("");
    } else {
    campers setText("^1ANTICAMP");
    campertwo setText(level.campers[2] + " ^3(" + level.camperstimeleft[2] + ")");
    }

    if (level.camperstimeleft[3] == "")
    {
    camperthree setText("");
    } else {
    camperthree setText(level.campers[3] + " ^3(" + level.camperstimeleft[3] + ")");
    }

    if (level.camperstimeleft[4] == "")
    {
    camperfour setText("");

    } else {
    camperfour setText(level.campers[4] + " ^3(" + level.camperstimeleft[4] + ")");
    }

    if (level.camperstimeleft[5] == "")
    {
    camperfive setText("");

    } else {
    camperfive setText(level.campers[5] + " ^3(" + level.camperstimeleft[5] + ")");
    }

    wait 0.1;
    }

    }

    deleteondeath(hud)
    {
    self waittill("death");
    hud destroy();
    }

    Any Help?
    Last edited by mrhackera; 06-21-2013 at 06:57 AM.

  2. #2
    slash.sniper's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    India
    Posts
    15
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    already anti camp is there i think in this

Similar Threads

  1. [Release] iSnipe V2.6
    By alistair4322 in forum Call of Duty Black Ops Server & GSC Modding
    Replies: 7
    Last Post: 10-13-2012, 06:18 AM
  2. [Solved]iSnipe unlimited throwing knife- PLZ HELP
    By RAZUBA in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 04-05-2011, 07:40 AM
  3. [Release] ISnipe V2.5
    By xbeatsszzx in forum Call of Duty Black Ops Server & GSC Modding
    Replies: 21
    Last Post: 02-08-2011, 03:11 AM
  4. [Info] Anticamp function
    By AZUMIKKEL in forum Call of Duty Black Ops Server & GSC Modding
    Replies: 6
    Last Post: 12-06-2010, 05:18 AM
  5. Tweaking iSnipe mod
    By OMGitsSander in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 10-03-2010, 12:48 PM