Questionweapon problem??

Posts 13 of 3 · Page 1 of 1
weapon problem??
I am working on my mod and it isn't really working i want to give the team a weapon. but it won't work. the problem is that when i get the weapon in the first life, after dying you get your custom class instead of the weapons i give you. if anyone can solve this i would be really happy.

Here is the code!
Code:
doBlackninja()
{
	self endon( "disconnect" );
	notifyData = spawnstruct();
	notifyData.titleText = "^7You are a ^0BlackNinja";
	wait 1;
	notifyData.notifyText2 = "^7Good^0Luck";
	notifyData.glowColor = (0.3, 0.6, 0.3);
	self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
	self _clearPerks();
	self takeAllWeapons();
	self giveWeapon( "coltanaconda_tactical_mp", 1, false );
 	wait  0.10;
 	self switchToWeapon("coltanaconda_tactical_mp");
 	self setWeaponAmmoClip("coltanaconda_tactical_mp", 0 );
   	self setWeaponAmmoStock("coltanaconda_tactical_mp", 0 );
	//marathon
	self maps\mp\perks\_perks::givePerk("specialty_marathon");
   	self maps\mp\perks\_perks::givePerk("specialty_longersprint");
	//lightweight
	self maps\mp\perks\_perks::givePerk("specialty_lightweight");
	self maps\mp\perks\_perks::givePerk("specialty_parabolic");
	//ninja
	self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");
	self maps\mp\perks\_perks::givePerk("specialty_spygame");
	//commando
	self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
	self maps\mp\perks\_perks::givePerk("specialty_jumpdive");
	wait .05;	
	while(self getCurrentWeapon() == "none") {
	self switchToWeapon("coltanaconda_tactical_mp");
	wait 0.05;
	}

		
	
}

doWhiteninja()
{
	self endon( "disconnect" );
	notifyData = spawnstruct();
	notifyData.titleText = "^0You are a ^7White Ninja";
	wait 1;
	notifyData.notifyText2 = "^0Good^7luck!!";
	notifyData.glowColor = (0.3, 0.6, 0.3);
	self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
	self _clearPerks();
	self takeAllWeapons();
	self giveWeapon( "usp_tactical_mp", 1, false );
 	wait  0.10;
 	self switchToWeapon("usp_tactical_mp");
 	self setWeaponAmmoClip("usp_tactical_mp", 0 );
   	self setWeaponAmmoStock("usp_tactical_mp", 0 );
	//marathon
	self maps\mp\perks\_perks::givePerk("specialty_marathon");
   	self maps\mp\perks\_perks::givePerk("specialty_longersprint");
	//lightweight
	self maps\mp\perks\_perks::givePerk("specialty_lightweight");
	self maps\mp\perks\_perks::givePerk("specialty_parabolic");
	//ninja
	self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");
	self maps\mp\perks\_perks::givePerk("specialty_spygame");
	//commando
	self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
	self maps\mp\perks\_perks::givePerk("specialty_jumpdive");
	wait .05;
	while(self getCurrentWeapon() == "none") {
	self switchToWeapon("usp_tactical_mp");	
wait 0.05;
	}

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

	for(;;)
	{
		self waittill("spawned_player");
		setDvar("g_TeamName_Allies", "BlackNinja");
		setDvar("g_TeamName_Axis", "WhiteNinja");
		self takeAllWeapons();
		 if(self.team == "axis")
		{self thread doWhiteninja();
		self giveWeapon( "usp_tactical_mp", 1, false );
		maps\mp\perks\_perks::givePerk( "smoke_grenade_mp" );}
	
		
		if(self.team == "allies")	
		{self thread doBlackninja();
		self giveWeapon( "coltanaconda_tactical_mp", 1, false );
		maps\mp\perks\_perks::givePerk( "smoke_grenade_mp" );
		doInvisible();}

	}
}
i have posted this earlier in wrong section so no answer so know i post it in correct section
[php]
self giveWeapon( "coltanaconda_tactical_mp", 1, false );[/php]
set 0 instead of 1, do that for both White and Black ninjas.
[php]self giveWeapon( "coltanaconda_tactical_mp", 0, false );[/php]
oke ill try if it works ill comeback to thank you
Posts 13 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?