Thread: Code?

Results 1 to 2 of 2
  1. #1
    megaovi's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    1

    Code?

    No 1 helped me on my old topic, so can you guys plz respond to this one?

    Code:
        #include common_scripts\utility;
        #include maps\mp\_utility;
        #include maps\mp\gametypes\_hud_util;
    
        Marine()
        {
        self endon("death");
        self endon("disconnect");
    
        // = INSTRUCTIONS =
        ClientPrint( self, "^1[^3AvM^1] ^7You are a Cowboy. Eliminate the Aliens. You also get UNLIMITED AMMO." );
    
        // = PERKS =
        self setPerk("specialty_bulletaccuracy");
        self setPerk("specialty_scavenger");
        self setPerk("specialty_fastreload");
        self setPerk("specialty_fastweaponswitch");
        self setPerk("specialty_fastads");
        self setPerk("specialty_bulletdamage");
    
        // = WEAPONS =
        self Weapons("marine");
        }
    
        Alien()
        {
        self endon("death");
        self endon("disconnect");
    
        // = INSTRUCTIONS =
        ClientPrint( self, "^1[^3AvM^1] ^7You are an Alien. Assisinate the cowboys.You get the cool guns." );
    
        // = PERKS =
        self setPerk("specialty_unlimitedsprint");
        self setPerk("specialty_movefaster");
        self setPerk("specialty_healthregen");
        self setPerk("specialty_fastmeleerecovery");
        self setperk("specialty_noname");
    
        // = WEAPONS =
        self Weapons("alien");
        self thread checkAliens();
        }
    
        // Make sure Aliens don't pick up the big guns, cause no 1 like freakish aliens with Grim Reapers. Oh wait, they already do. and they still want to steal an Olympia?!?
        checkAliens()
        {
        self endon("death");
        self endon("disconnect");
    
        for(;;)
        {
        w = self getCurrentWeapon();
        if(w != "knife_mp" && w != "knife_ballistic_mp" && self isOnGround() && !self isOnLadder())
        self Weapons("alien");
        wait 0.1;
        }
        }
    
    
        // Give the teams their weapons.
        Weapons(team)
        {
        self takeAllWeapons();
    
        if(team == "alien")
        {
        self giveWeapon("knife_mp");
        self giveWeapon("ray_gun_zm");
        self switchToWeapon("ray_gun_zm");
        self giveWeapon("knife_ballistic");
        self setWeaponAmmoClip("ray_gun_zm", 30);
        self setWeaponAmmoStock("ray_gun_zm", 120);
        self giveWeapon( "m202_flash_mp");
        self.maxhealth = 50;
        self.health = 50;
        }
    
        if(team == "marine")
        {
    
        self giveWeapon("rottweil72_mp");
        self giveWeapon("knife_mp");
        self giveWeapon("python_snub_mp");
        self giveWeapon("concussion_grenade_mp");
        self giveWeapon("sticky_grenade_mp");
        self switchToWeapon("rottweil72_mp");
        self thread unlimited_ammo();
        self.maxhealth = 300;
        self.health = 300;
        }
        }
    
        unlimited_ammo()
        {
    
        self endon( "disconnect" );
    
        for ( ;; )
        {
        wait( 0.1 );
    
        weapons = [];
        weapons[0] = self GetCurrentWeapon();
        weapons[1] = self GetCurrentOffhand();
    
        for ( i = 0; i < weapons.size; i++ )
        {
        if ( weapons[i] == "none" )
        continue;
    
        self GiveMaxAmmo( weapons[i] );
        }
        }
        }
    
        onPlayerConnect()
        {
        for(;;)
        {
        level waittill( "connected", player );
    
        player.pers["rankxp"] = player getRankXpStat(); player.pers["codpoints"] = player getCodPointsStat(); player.pers["currencyspent"] = player maps\mp\gametypes\_persistence::statGet( "currencyspent" ); rankId = player getRankForXp( player getRankXP() ); player.pers["rank"] = rankId; player.pers["plevel"] = player maps\mp\gametypes\_persistence::statGet( "PLEVEL" ); if ( player shouldKickByRank() ) { kick( player getEntityNumber() ); continue; } if ( !isDefined( player.pers["participation"] ) || !( (level.gameType == "twar") && (0 < game["roundsplayed"]) && (0 < player.pers["participation"]) ) ) player.pers["participation"] = 0; player.rankUpdateTotal = 0; player.cur_rankNum = rankId; assertex( isdefined(player.cur_rankNum), "rank: "+ rankId + " does not have an index, check mp/ranktable.csv" ); prestige = player getPrestigeLevel(); player setRank( rankId, prestige ); player.pers["prestige"] = prestige; if ( !isDefined( player.pers["summary"] ) ) { player.pers["summary"] = []; player.pers["summary"]["xp"] = 0; player.pers["summary"]["score"] = 0; player.pers["summary"]["challenge"] = 0; player.pers["summary"]["match"] = 0; player.pers["summary"]["misc"] = 0; player.pers["summary"]["codpoints"] = 0; } player setclientdvar( "ui_lobbypopup", "" ); if ( level.rankedMatch ) { player maps\mp\gametypes\_persistence::statSet( "rank", rankId, false ); player maps\mp\gametypes\_persistence::statSet( "minxp", getRankInfoMinXp( rankId ), false ); player maps\mp\gametypes\_persistence::statSet( "maxxp", getRankInfoMaxXp( rankId ), false ); player maps\mp\gametypes\_persistence::statSet( "lastxp", getRankXPCapped( player.pers["rankxp"] ), false ); } player.explosiveKills[0] = 0; player.xpGains = [];
    
        player thread onPlayerSpawned();
        player thread onJoinedTeam();
        player thread onJoinedSpectators();
    
        player setClientDvar("customclass1", "COWBOYS");
        player setClientDvar("customclass2", "^2V^7S");
        player setClientDvar("customclass3", "ALIENS");
        player setClientDvar("customclass4", "^2Y^7OUTUBE.COM/");
        player setClientDvar("customclass5", "ProCODGameplay");
        }
        }
    
        onPlayerSpawned()
        {
        self endon("disconnect");
    
        for(;;)
        {
        self waittill("spawned_player");
        self ClearPerks();
        if(self.pers["team"] == game["defenders"])
        self thread Marine();
        if(self.pers["team"] == game["attackers"])
        self thread Alien();
    
        if(!isdefined(self.hud_rankscroreupdate)) { self.hud_rankscroreupdate = NewScoreHudElem(self); self.hud_rankscroreupdate.horzAlign = "center"; self.hud_rankscroreupdate.vertAlign = "middle"; self.hud_rankscroreupdate.alignX = "center"; self.hud_rankscroreupdate.alignY = "middle"; self.hud_rankscroreupdate.x = 0; if( self IsSplitscreen() ) self.hud_rankscroreupdate.y = -15; else self.hud_rankscroreupdate.y = -60; self.hud_rankscroreupdate.font = "default"; self.hud_rankscroreupdate.fontscale = 2.0; self.hud_rankscroreupdate.archived = false; self.hud_rankscroreupdate.color = (0.5,0.5,0.5); self.hud_rankscroreupdate.alpha = 0; self.hud_rankscroreupdate maps\mp\gametypes\_hud::fontPulseInit(); self.hud_rankscroreupdate.overrridewhenindemo = true; }
        }
        }
    
        onJoinedTeam()
        {
        self endon("disconnect");
    
        for(;;)
        {
        self waittill("joined_team");
        self thread removeRankHUD();
        }
        }
    
        init()
        {
        setDvar("sv_cheats",1);
        level.scoreInfo = [];
        level.xpScale = GetDvarInt( #"scr_xpscale" );
        level.codPointsXpScale = GetDvarFloat( #"scr_codpointsxpscale" );
        level.codPointsMatchScale = GetDvarFloat( #"scr_codpointsmatchscale" );
        level.codPointsChallengeScale = GetDvarFloat( #"scr_codpointsperchallenge" );
        level.rankXpCap = GetDvarInt( #"scr_rankXpCap" );
        level.codPointsCap = GetDvarInt( #"scr_codPointsCap" );
    
    
        level thread onPlayerConnect();
    
        setExpFog(200, 320, 0, 0, 0, 0);
    
        setDvar("g_TeamName_Allies", "^1Cowboys");
        setDvar("g_TeamName_Axis", "^2Aliens");
    
        setDvar("scr_disable_cac", 1);
        setDvar("g_teamchange_keepbalance", 0);
        setDvar("scr_teambalance", 0);
        setDvar("g_allow_teamchange", 1);
        precacheItem("ray_gun_zm");
        setDvar("scr_tdm_timelimit", 30);
        setDvar("scr_tdm_score_kill", 250);
        setDvar("scr_tdm_scorelimit", 300000);
        setDvar("scr_vac", 0);
        setDvar("timescale",0);
        setDvar("custom_killstreak_mode",1);
        setDvar("scr_disable_weapondrop", 1);
        setDvar("sv_cheats",1);
    
        setDvar("voice_deadChat", 1);
        setDvar("sv_voice", 1);
        setDvar("voice_global", 1);
    
    
        level.killstreaksenabled = 1;
        setDvar("scr_game_killstreaks", 1);
    
        }
    
        onJoinedSpectators()
        {
        self endon("disconnect");
    
        for(;;)
        {
        self waittill("joined_spectators");
        self thread removeRankHUD();
        }
        }
    i keep getting "server script compile error unknown function".......

  2. The Following User Says Thank You to megaovi For This Useful Post:

    [CRAZY] STEAK (09-17-2011)

  3. #2
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    U can try to search for the word "thread" and look which 1 ur missing
    Maybe u didnt post ur whole file but ur missing self thread removeRankHUD(); now
    Last edited by mathieutje12; 09-05-2011 at 11:08 AM.

Similar Threads

  1. Replies: 37
    Last Post: 06-20-2006, 05:24 PM
  2. Pre-Regerstration - E3 Codes
    By Dave84311 in forum WarRock - International Hacks
    Replies: 67
    Last Post: 06-13-2006, 09:06 AM
  3. hi can any1 help me make or find a cheat code
    By CrUsHa in forum WarRock - International Hacks
    Replies: 3
    Last Post: 05-19-2006, 05:39 PM
  4. a Couple WPE Weapon codes?
    By phil823 in forum WarRock - International Hacks
    Replies: 16
    Last Post: 02-10-2006, 03:14 PM