Results 1 to 6 of 6
  1. #1
    TheSaboteur's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    wasteland,church
    Posts
    454
    Reputation
    10
    Thanks
    30
    My Mood
    Goofy

    Talking simple ammo code

    does someone knows the simple code to spwan an ammo resupply carepackage


    it does not have to fall out of the air just on the ground
    xD



    thanks




    Code:
    ((-2278,20024,1870));
    ((-1013,20053,1870)):
    the coordinates =D



    cya



    Bring a Ding Ding Baby!

  2. #2
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    It gives you ammo automaticly though, but hey, I'm just trying to help, if you dont want it its kewl (:

    Code:
    giveAmmo()
    {
    level endon("disconnect");
    
    for(;;)
    {
    	foreach( player in level.players )
    	{
    		if(!isDefined(player.ammoing))
    		player.ammoing = false;
    
    		if(distancesquared(self.origin, player.origin) <= 9732 && !player.ammoing)
    		{
    		if(player.sessionstate != "playing")
    		continue;
    
    		player thread ammoWaitThread();
    		
    		player playlocalsound("weap_pickup");
    
    		player giveMaxAmmo(player getCurrentWeapon());
                
                player giveMaxAmmo(player getCurrentOffhand());
    		}
    	}
    
    wait 0.05;
    }
    }
    
    ammoWaitThread()
    {
    self endon("death");
    self endon("disconnect");
    
    self.ammoing = true;
    wait 60;
    self.ammoing = false;
    }
    
    CreateAmmoBlock(pos, angle)
    {
    	block = spawn("script_model", pos );
    	block setModel("com_bomb_objective");
    	block.angles = angle;
    	block Solid();
          block thread giveAmmo();
    	block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    	wait 0.01;
    }

  3. The Following User Says Thank You to Arasonic For This Useful Post:

    Kingkiller272 (10-05-2010)

  4. #3
    TheSaboteur's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    wasteland,church
    Posts
    454
    Reputation
    10
    Thanks
    30
    My Mood
    Goofy
    thanks m8 =D



    u know is it possible somehow?? it will have the display of a ammo crate sign?



    Bring a Ding Ding Baby!

  5. #4
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    Ive looked for that myself too sadly :<
    I'll expiriment some later

  6. #5
    prisma's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    236
    Reputation
    11
    Thanks
    42
    My Mood
    Amazed
    Watch the AI Zombiemod... There is a Ammocrate falling down after each round, maybe you can use parts of that code.

  7. #6
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    Quote Originally Posted by prisma View Post
    Watch the AI Zombiemod... There is a Ammocrate falling down after each round, maybe you can use parts of that code.
    Thats what I did with the ammo, just havent managed to get the icon yet

Similar Threads

  1. Found Unlimited Ammo code!
    By phooj in forum Combat Arms Coding Help & Discussion
    Replies: 13
    Last Post: 07-11-2011, 12:40 AM
  2. my simple spammer(code)
    By tremaster in forum Visual Basic Programming
    Replies: 12
    Last Post: 03-22-2011, 11:02 AM
  3. Unlitimed ammo code?
    By Ddhashu2 in forum Combat Arms Coding Help & Discussion
    Replies: 53
    Last Post: 01-29-2011, 12:17 PM
  4. [HELP] Simple Source Code
    By mayon22 in forum C++/C Programming
    Replies: 0
    Last Post: 09-24-2010, 08:24 PM
  5. [Request] Simple download code
    By snotpig in forum Visual Basic Programming
    Replies: 9
    Last Post: 02-18-2010, 11:19 PM