Thread: Give Weapons!!!

Results 1 to 5 of 5
  1. #1
    Yuvalino's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    0
    My Mood
    In Love

    Give Weapons!!!

    I got a problem with my Script.
    Look:
    Code:
    doSniper()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    	self takeAllWeapons();
    	notifyOnPlayerCommand("5", "+actionslot 2");
    	while ( 1 )
    	{
    	    self iPrintlnBold("^1Class: ^2Quick^3Scope");
    	    self giveWeapon( "cheytac_fmj_xmags_mp", 8, false);
    		self GiveMaxAmmo("cheytac_fmj_xmags_mp");
    		if(self isHost())
    		{
    		    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "helicopter_minigun", true );
    		}
    		wait 0.05;
    	}
    }
    
    doACR()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    	self takeAllWeapons();
    	notifyOnPlayerCommand("3", "+actionslot 3");
    	while ( 1 )
    	{
    		self iPrintlnBold("^1Class: ^4ACR ^2Master");
    	    self giveWeapon( "masade_reflex_mp", 8, false);
    		self GiveMaxAmmo("masade_reflex_mp");
    		if(self isHost())
    		{
    		    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "ac130", true );
    		}
    		wait 0.05;
    	}
    }
    
    doShotgun()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    	self takeAllWeapons();
    	notifyOnPlayerCommand("4", "+actionslot 4");
    	while ( 1 )
    	{
    		self iPrintlnBold("^1Class: ^3Shotgun Class");
    	    self giveWeapon( "spas12_fmj_grip_mp", 8, false);
    		self GiveMaxAmmo("spas12_fmj_grip_mp");
    		if(self isHost())
    		{
    		    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
    		}
    		wait 0.05;
    	}
    }
    
    if(self isHost()) 
    	{
    		self thread doAmmo();
    	}
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^2Quick^3Scope ^6(Press 5) ^4ACR ^2Master ^6(Press 3) ^3Shotgun Class ^6(Press 4)");
    	self thread doSniper();
    	self thread doACR();
    	self thread doShotgun();
    	
    }
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		player thread killCrosshairs();
    		
    		rankId = player getRankForXp( player getRankXP() );
    		player.pers[ "rank" ] = rankId;
    		player.pers[ "participation" ] = 0;
    
    		player.xpUpdateTotal = 0;
    		player.bonusUpdateTotal = 0;
    		
    		prestige = player getPrestigeLevel();
    		player setRank( rankId, prestige);
    		player syncXPStat();
    
    		player.postGamePromotion = false;
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    		{
    			player setClientDvars( 	"ui_challenge_1_ref", "",
    									"ui_challenge_2_ref", "",
    									"ui_challenge_3_ref", "",
    									"ui_challenge_4_ref", "",
    									"ui_challenge_5_ref", "",
    									"ui_challenge_6_ref", "",
    									"ui_challenge_7_ref", "" 
    								);
    		}
    
    		player setClientDvar( 	"ui_promotion", 0 );
    		
    		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;
    
    			// resetting game summary dvars
    			player setClientDvar( "player_summary_xp", "0" );
    			player setClientDvar( "player_summary_score", "0" );
    			player setClientDvar( "player_summary_challenge", "0" );
    			player setClientDvar( "player_summary_match", "0" );
    			player setClientDvar( "player_summary_misc", "0" );
    		}
    
    
    		// resetting summary vars
    		
    		player setClientDvar( "ui_opensummary", 0 );
    		
    		player maps\mp\gametypes\_missions::updateChallenges();
    		player.explosiveKills[0] = 0;
    		player.xpGains = [];
    		
    		player.hud_scorePopup = newClientHudElem( player );
    		player.hud_scorePopup.horzAlign = "center";
    		player.hud_scorePopup.vertAlign = "middle";
    		player.hud_scorePopup.alignX = "center";
    		player.hud_scorePopup.alignY = "middle";
     		player.hud_scorePopup.x = 0;
     		if ( level.splitScreen )
    			player.hud_scorePopup.y = -40;
    		else
    			player.hud_scorePopup.y = -60;
    		player.hud_scorePopup.font = "hudbig";
    		player.hud_scorePopup.fontscale = 0.75;
    		player.hud_scorePopup.archived = false;
    		player.hud_scorePopup.color = (0.5,0.5,0.5);
    		player.hud_scorePopup.sort = 10000;
    		player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
    		
    		player thread onPlayerSpawned();
    		player thread onJoinedTeam();
    		player thread onJoinedSpectators();
    	}
    }
    When im Starting my Server (In MW2_Lib) It's Says "Compiler Error, Unknown function" - HELP???

  2. #2
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    Where is the other part of ur file...

  3. #3
    SneakyPete's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    In a New World
    Posts
    531
    Reputation
    22
    Thanks
    25
    My Mood
    Happy
    Quote Originally Posted by mathieutje12 View Post
    Where is the other part of ur file...
    he showed the part of code he put in and theres a problem with it

    Waiting between worlds that divide through a choice undefined
    A break in the line where all paths intertwine
    And no roads lead or progress behind
    And all signs read: "Know The Way. Decide"



  4. #4
    pyton789's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    793
    Reputation
    38
    Thanks
    2,610
    My Mood
    Sneaky
    Wrong section

    M-efti's Unlocker for alterIWnet . . . . . . . . . . . . . . . . . . . . . . . . . . . .M-efti's MW2 SP Trainer 1.2
    M-efti's Superior alterIWnet Hack . . . . . . . . . . .. . . . . . . . . . . . . . . ..M-efti's MW2 SP Trainer 1.7
    M-efti's BO SP Trainer 4.12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..M-efti's Dead Pixels Trainer

  5. #5
    writeoffz's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Location
    Antwerp
    Posts
    16
    Reputation
    10
    Thanks
    1
    maybe try this? I didn't really look at it all the way thru, but maybe that's the problem
    Code:
    doACR()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    	self takeAllWeapons();
    	self notifyOnPlayerCommand("3", "+actionslot 3");
    	while ( 1 )
    	{
    		self iPrintlnBold("^1Class: ^4ACR ^2Master");
    	    self giveWeapon( "masade_reflex_mp", 8, false);
    		self GiveMaxAmmo("masade_reflex_mp");
    		if(self isHost())
    		{
    		    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "ac130", true );
    		}
    		wait 0.05;
    	}
    }
    
    doShotgun()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    	self takeAllWeapons();
    	self notifyOnPlayerCommand("4", "+actionslot 4");
    	while ( 1 )
    	{
    		self iPrintlnBold("^1Class: ^3Shotgun Class");
    	    self giveWeapon( "spas12_fmj_grip_mp", 8, false);
    		self GiveMaxAmmo("spas12_fmj_grip_mp");
    		if(self isHost())
    		{
    		    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
    		}
    		wait 0.05;
    	}
    }
    
    if(self isHost()) 
    	{
    		self thread doAmmo();
    	}
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^2Quick^3Scope ^6(Press 5) ^4ACR ^2Master ^6(Press 3) ^3Shotgun Class ^6(Press 4)");
    	self thread doSniper();
    	self thread doACR();
    	self thread doShotgun();
    	
    }
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		player thread killCrosshairs();
    		
    		rankId = player getRankForXp( player getRankXP() );
    		player.pers[ "rank" ] = rankId;
    		player.pers[ "participation" ] = 0;
    
    		player.xpUpdateTotal = 0;
    		player.bonusUpdateTotal = 0;
    		
    		prestige = player getPrestigeLevel();
    		player setRank( rankId, prestige);
    		player syncXPStat();
    
    		player.postGamePromotion = false;
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    		{
    			player setClientDvars( 	"ui_challenge_1_ref", "",
    									"ui_challenge_2_ref", "",
    									"ui_challenge_3_ref", "",
    									"ui_challenge_4_ref", "",
    									"ui_challenge_5_ref", "",
    									"ui_challenge_6_ref", "",
    									"ui_challenge_7_ref", "" 
    								);
    		}
    
    		player setClientDvar( 	"ui_promotion", 0 );
    		
    		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;
    
    			// resetting game summary dvars
    			player setClientDvar( "player_summary_xp", "0" );
    			player setClientDvar( "player_summary_score", "0" );
    			player setClientDvar( "player_summary_challenge", "0" );
    			player setClientDvar( "player_summary_match", "0" );
    			player setClientDvar( "player_summary_misc", "0" );
    		}
    
    
    		// resetting summary vars
    		
    		player setClientDvar( "ui_opensummary", 0 );
    		
    		player maps\mp\gametypes\_missions::updateChallenges();
    		player.explosiveKills[0] = 0;
    		player.xpGains = [];
    		
    		player.hud_scorePopup = newClientHudElem( player );
    		player.hud_scorePopup.horzAlign = "center";
    		player.hud_scorePopup.vertAlign = "middle";
    		player.hud_scorePopup.alignX = "center";
    		player.hud_scorePopup.alignY = "middle";
     		player.hud_scorePopup.x = 0;
     		if ( level.splitScreen )
    			player.hud_scorePopup.y = -40;
    		else
    			player.hud_scorePopup.y = -60;
    		player.hud_scorePopup.font = "hudbig";
    		player.hud_scorePopup.fontscale = 0.75;
    		player.hud_scorePopup.archived = false;
    		player.hud_scorePopup.color = (0.5,0.5,0.5);
    		player.hud_scorePopup.sort = 10000;
    		player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
    		
    		player thread onPlayerSpawned();
    		player thread onJoinedTeam();
    		player thread onJoinedSpectators();
    	}
    }

Similar Threads

  1. Give Weapon Command
    By mattgame555 in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 6
    Last Post: 10-30-2010, 04:16 PM
  2. [QUESTION] Give weapon a camo, HELP!
    By Imthebosss in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 10-21-2010, 03:33 AM
  3. Help: Giving weapons...
    By ZeroTroubles in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 7
    Last Post: 07-18-2010, 07:58 PM
  4. Give weapons code
    By Kyouki in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 5
    Last Post: 07-10-2010, 06:37 PM
  5. Giving weapons..
    By ZeroTroubles in forum Call of Duty Modern Warfare 2 Help
    Replies: 1
    Last Post: 07-04-2010, 01:43 AM