Results 1 to 6 of 6
  1. #1
    apache-wd-forum's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    5

    Weapon Spawn - Code bug?

    Why I can only spawn one weapon? My other weapons [see Code], are not there.




    Code:
    SpawnWeapons(WFunc,Weapon,WeaponName,Location,TakeOnce,angle,gun)
    {
    	self endon("disconnect");
    	gun delete();
    	weapon_model=getWeaponModel(Weapon);
    	if(weapon_model=="")weapon_model=Weapon;
    	Wep=spawn("script_model",Location+(0,0,0));
    	Wep setModel(weapon_model);
    	Wep.angles=angle;
    	for(;;)
    	{
    		foreach(player in level.players)
    		{
    			Radius=distance(Location,player.origin);
    			if(Radius<80)
    			{
    				player setLowerMessage(WeaponName,"Press ^3[{+activate}]^7 to swap for "+WeaponName);
    				if(player UseButtonPressed())wait 0.2;
    				if(player UseButtonPressed())
    				{
    					if(!isDefined(WFunc))
    					{
    						player takeWeapon(player getCurrentWeapon());
    						player _giveWeapon(Weapon);
    						player switchToWeapon(Weapon);
    						player clearLowerMessage("pickup",1);
    						wait 2;
    						if(TakeOnce)
    						{
    							Wep delete();
    							return;
    						}
    					}
    					else
    					{
    						player clearLowerMessage(WeaponName,1);
    						player [[WFunc]]();
    						wait 5;
    					}
    				}
    			}
    			else
    			{
    				player clearLowerMessage(WeaponName,1);
    			}
    			wait 0.1;
    		}
    		wait 0.5;
    	}
    }

    Code:
    Rust()
    {
    	CreateBlocks((773, 1080, 258), (0, 90, 0));
    	CreateRamps((745, 1570, 383), (745, 1690, 273));
    	CreateDoors((565, 1540, 295), (653, 1540, 295), (90, 90, 0), 3, 2, 15, 60);
    	CreateGrids((773, 1135, 258), (533, 1795, 258), (0, 0, 0));
    	CreateGrids((695, 1795, 378), (533, 1540, 378), (0, 0, 0));
    	CreateGrids((773, 1540, 498), (533, 1795, 498), (0, 0, 0));
    	CreateWalls((533, 1795, 278), (773, 1795, 498));
    	CreateWalls((790, 1795, 278), (790, 1540, 498));
    	CreateWalls((515, 1540, 278), (515, 1795, 498));
    	CreateWalls((773, 1540, 278), (715, 1540, 378));
    	CreateWalls((590, 1540, 278), (533, 1540, 378));
    	CreateWalls((773, 1540, 398), (533, 1540, 428));
    	CreateWalls((773, 1540, 458), (740, 1540, 498));
    	CreateWalls((566, 1540, 458), (533, 1540, 498));
    
    	SpawnWeapons(undefined, "cheytac_fmj_xmags_mp","Intervention",(-1525.24, -618.255, -181.442),0,(0, 12.4805, 2));
    	SpawnWeapons(undefined, "cheytac_fmj_xmags_mp","Intervention",(-1570.5, -426.009, -191.707),0,(0, 13.8098, 2));
    	SpawnWeapons(undefined, "cheytac_fmj_xmags_mp","Intervention",(-1616.33, -257.707, -198.371),0,(0, 16.6003, 2));
    	SpawnWeapons(undefined, "cheytac_fmj_xmags_mp","Intervention",(-1679.32, -71.8425, -205.547),0,(0, 17.4078, 2));
    
    	CreateRamps((761.496, 1082.41, 268.125),(1487.17, 1004.01, -132.729));
    	CreateRamps((1196.07, 1200, -103.875),(1385.72, 1189.4, -235.665));
    	CreateRamps((-269.467, 803.671, -132.875),(-255.766, 1039.92, -235.517));
    	CreateElevator((-756.23, -5357.28, -231.667),(-4114.06, -5353.85, 1223.66));
    	CreateElevator((-1948.55, 5347.99, -50.1143),(-9901.73, 304.533, 1315.93));
    	CreateElevator((1636.57, -222.69, -224.475),(1690.81, -279.993, -209.872));
    	CreateElevator((-523.164, -280.326, -219.107),(-468.875, -224.875, -208.082));
    	CreateElevator((1685.62, 1860.73, -216.46),(1629.07, 1797.74, -215.573));
    	CreateElevator((707.904, 965.688, -200.893),(676.526, 1672.43, 392.625));
    }
    Last edited by apache-wd-forum; 09-30-2011 at 04:05 AM.

  2. #2
    frandaman's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    141
    Reputation
    9
    Thanks
    45
    My Mood
    Yeehaw
    can you use mods without AtrlWnet?
    10 posts [o]

    20 posts [o]

    30 posts [o]

    40 posts [o]

    50 posts [o]

    75 posts [o]

    100posts [o]

    200posts [x]

    10000posts [unlikley]
    PRESS THANKS IF I HELPED

  3. #3
    apache-wd-forum's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by frandaman View Post
    can you use mods without AtrlWnet?
    Write only for Mod's alteriw and use only alteriw
    Last edited by apache-wd-forum; 09-30-2011 at 01:44 PM.

  4. #4
    krijnrien's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    68
    Reputation
    10
    Thanks
    7
    My Mood
    Goofy
    if take once wep delete??
    im not good modder
    but maybe its that?

  5. #5
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    154
    My Mood
    Amazed
    In SP works this, and I think that in MP too:

    Code:
    SpawnWeap(weapon,location,angles)
    {
    Wep = spawn(weapon,location);
    Wep.angles = (angles);
    }

  6. The Following User Says Thank You to Yamato For This Useful Post:

    alvarogt1995 (11-06-2011)

  7. #6
    EpiclyCrazyWeed's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    2
    My Mood
    Buzzed
    Quote Originally Posted by frandaman View Post
    can you use mods without AtrlWnet?
    on steam you can
    Last edited by EpiclyCrazyWeed; 11-09-2011 at 04:27 PM.

Similar Threads

  1. 3 second immortality spawn hack/bug
    By indeedz in forum CrossFire Discussions
    Replies: 22
    Last Post: 03-17-2011, 03:50 PM
  2. Custom Map Weapon Spawn :P
    By supercarz1991 in forum Combat Arms Mod Discussion
    Replies: 7
    Last Post: 03-08-2011, 07:26 AM
  3. Boon Pek Weapon Spawn Code
    By jimmynguyen3030 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 1
    Last Post: 01-26-2011, 01:45 PM
  4. Lifetime Weapon + AWM Code = screwed?
    By 702 in forum WarRock - International Hacks
    Replies: 2
    Last Post: 05-13-2008, 06:48 PM
  5. Heavy Weapons Class mine bug. I had no idea.
    By NukeAssault in forum General Gaming
    Replies: 2
    Last Post: 07-20-2006, 06:54 AM