Give Weapons!!!

Posts 1–5 of 5 · Page 1 of 1
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???
Where is the other part of ur file...
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
Wrong section
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();
	}
}
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us