Results 1 to 3 of 3
  1. #1
    gam60v6r's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Netherlands
    Posts
    117
    Reputation
    10
    Thanks
    17
    My Mood
    Amazed

    Question 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
    Last edited by gam60v6r; 10-26-2010 at 01:27 PM. Reason: not ready

    The dark side is to strong even Yoda can't resist.

  2. #2
    TheLynx's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Sverige
    Posts
    366
    Reputation
    10
    Thanks
    42
    My Mood
    Happy
    [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]

  3. #3
    gam60v6r's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Netherlands
    Posts
    117
    Reputation
    10
    Thanks
    17
    My Mood
    Amazed
    oke ill try if it works ill comeback to thank you

    The dark side is to strong even Yoda can't resist.

Similar Threads

  1. Weapon stock & GL stock problem
    By Arasonic in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 0
    Last Post: 10-21-2010, 03:21 PM
  2. Weapon problem
    By redninjaboy2 in forum Combat Arms Discussions
    Replies: 9
    Last Post: 10-08-2010, 07:10 PM
  3. Problem hacks weapons
    By Nikko42 in forum WarRock - International Hacks
    Replies: 2
    Last Post: 09-03-2007, 02:20 PM
  4. problem with the "New" Weapons
    By NetNavi in forum WarRock - International Hacks
    Replies: 27
    Last Post: 07-25-2007, 08:09 AM
  5. Vb6 Problem With Weapon Code?
    By jokuvaan11 in forum WarRock - International Hacks
    Replies: 6
    Last Post: 07-03-2007, 01:06 AM