Results 1 to 10 of 13

Thread: Need help for weapon wall

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ... connecting
    Join Date
    Jun 2014
    Posts
    6
    Thanks
    0
    Thanked 1 Time in 1 Post

    Need help for weapon wall

    ( i'm not good for scripting )
    i see the weapon wall script but only for 1 weapons
    so i do this script , its wrong idk why please say me

    H
    E
    L
    P


    Code:
    main() { maps\mp\_load::main(); thread teleport(); thread buyweap();  thread buyweap1();  thread buyweap2();  thread buyweap3();  thread buyweap4();  thread buyweap5();  thread buyweap6();  thread buyweap7();  thread buyweap8();  thread buyweap9(); thread buyweap10(); }
    
    buyweap()
    {
    	buyweap = getent("buyweapon_kar98k", "targetname");
    	
    	while(1) 
    	{
    		buyweap waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "kar98k_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("kar98k_mp")); //checks if the player doesn't have kar98k
    
    		if(shopper.money >= 500 && wepcurrent == item && shopper.pers["team"] == "axis") //checks that it shopper has enough money and he already has kar98k and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=500; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo to kar98k
    		}
    		else if(shopper.pers["team"] != "axis") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Zombies^6=-"); 
    		}
    		else if(shopper.money < 500 && shopper.pers["team"] == "axis") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 500) //if player doesn't have kar98k and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=500; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("kar98k_mp"); //gives kar98k
    		}
    	}
    }
    
    buyweap1()
    {
    	buyweap1 = getent("buyweapon_MP5A4", "targetname");
    	
    	while(1) 
    	{
    		buyweap1 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "nsmp5a4_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("nsmp5a4_mp")); //checks if the player doesn't have kar98k
    
    		if(shopper.money >= 750 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has kar98k and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=750; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo to kar98k
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 750 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 750) //if player doesn't have kar98k and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=750; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("nsmp5a4_mp"); //gives kar98k
    		}
    	}
    }
    
    buyweap2()
    {
    	buyweap2 = getent("buyweapon_Dragunov", "targetname");
    	
    	while(1) 
    	{
    		buyweap2 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "nsdragunov_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("nsdragunov_mp")); //checks if the player doesn't have kar98k
    
    		if(shopper.money >= 750 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has kar98k and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=750; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo to kar98k
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 750 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 750) //if player doesn't have kar98k and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=750; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("nsdragunov_mp"); //gives kar98k
    		}
    	}
    }
    
    buyweap3()
    {
    	buyweap3 = getent("buyweapon_G36", "targetname");
    	
    	while(1) 
    	{
    		buyweap3 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "nsg36_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("nsg36_mp")); //checks if the player doesn't have kar98k
    
    		if(shopper.money >= 800 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has kar98k and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=800; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 800 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 800) //if player doesn't have the weapon and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=800; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("nsg36_mp");
    		}
    	}
    }
    
    buyweap4()
    {
    	buyweap4 = getent("buyweapon_Thompson", "targetname");
    	
    	while(1) 
    	{
    		buyweap4 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "thompson_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("thompson_mp")); //checks if the player doesn't have kar98k
    
    		if(shopper.money >= 250 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has the weapon and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=250; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 250 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 250) //if player doesn't have the weapon and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=250; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("thompson_mp");
    		}
    	}
    }
    
    buyweap5()
    {
    	buyweap5 = getent("buyweapon_MP40", "targetname");
    	
    	while(1) 
    	{
    		buyweap5 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "mp40_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("mp40_mp")); //checks if the player doesn't have the weapon
    
    		if(shopper.money >= 250 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has the weapon and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=250; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 250 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 250) //if player doesn't have the weapon and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=250; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("mp40_mp");
    		}
    	}
    }
    
    buyweap6()
    {
    	buyweap6 = getent("buyweapon_Winchester", "targetname");
    	
    	while(1) 
    	{
    		buyweap6 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "nswinchester_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("nswinchester_mp")); //checks if the player doesn't have the weapon
    
    		if(shopper.money >= 350 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has the weapon and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=350; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 350 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 350) //if player doesn't have the weapon and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=350; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("nswinchester_mp");
    		}
    	}
    }
    
    buyweap7()
    {
    	buyweap7 = getent("buyweapon_Winchester", "targetname");
    	
    	while(1) 
    	{
    		buyweap7 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "webley_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("webley_mp")); //checks if the player doesn't have the weapon
    
    		if(shopper.money >= 1000 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has the weapon and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=1000; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 1000 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 1000) //if player doesn't have the weapon and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=1000; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("webley_mp");
    		}
    	}
    }
    
    buyweap8()
    {
    	buyweap8 = getent("buyweapon_Bazooka", "targetname");
    	
    	while(1) 
    	{
    		buyweap8 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "panzerschrek_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("panzerschrek_mp")); //checks if the player doesn't have the weapon
    
    		if(shopper.money >= 350 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has the weapon and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=350; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 350 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 350) //if player doesn't have the weapon and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=350; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("panzerschrek_mp");
    		}
    	}
    }
    
    buyweap9()
    {
    	buyweap9 = getent("buyweapon_Bazooka", "targetname");
    	
    	while(1) 
    	{
    		buyweap9 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "panzerschrek_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("panzerschrek_mp")); //checks if the player doesn't have the weapon
    
    		if(shopper.money >= 350 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has the weapon and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=350; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4This Can Only Be Used By The Hunters^6=-"); 
    		}
    		else if(shopper.money < 350 && shopper.pers["team"] == "Allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1You Do Not Have Enough Money To Purchase This Item^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 350) //if player doesn't have the weapon and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=350; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("panzerschrek_mp");
    		}
    	}
    }
    
    buyweap10()
    {
    	buyweap10 = getent("give_kark", "targetname");
    	
    	while(1) 
    	{
    		buyweap10 waittill("trigger", shopper); //wait till the player activates the trigger
    		
    		item = "kar98k_mp"; //the weapon player will buy
    
    		wepcurrent = shopper getcurrentweapon(); //checks the current weapon
    		weapon1 = shopper getweaponslotweapon("primary"); //checks the primary weapon
    		weapon2 = shopper getweaponslotweapon("primaryb"); //checks the primaryb weapon
    		notwep = !(shopper hasweapon("kar98k_mp")); //checks if the player doesn't have kar98k
    
    		if(shopper.money >= 0 && wepcurrent == item && shopper.pers["team"] == "allies") //checks that it shopper has enough money and he already has kar98k and he is a hunter 
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    				
    			wepammo = shopper getweaponslotammo(currentslot);
    				
    			shopper.money-=0; //takes the money
    			shopper givemaxammo(wepcurrent); //gives max ammo to kar98k
    		}
    		else if(shopper.pers["team"] != "allies") //if player is a zombie
    		{
    			shopper iprintlnbold("^6-=^4Only Hunter Spawn with Kar98k^6=-"); 
    		}
    		else if(shopper.money < 0 && shopper.pers["team"] == "allies") //if player is a hunter and he doesn't have enough money
    		{
    			shopper iprintln("-=^1LoL^7=-");
    		}
    		else if(notwep && shopper.pers["team"] == "allies" && shopper.money >= 0) //if player doesn't have kar98k and player is a hunter and has enough money
    		{
    			if(wepcurrent == weapon1)
    			{
    				currentslot = "primary";
    			}
    			else
    			{
    				currentslot = "primaryb";
    			}
    
    			shopper.money-=0; //take the money
    			shopper setweaponslotweapon(currentslot, item);
    			shopper SwitchToWeapon("kar98k_mp"); //gives kar98k
    		}
    	}
    }
    Last edited by Tally; 13th October 2014 at 11:24.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •