Talkingsimple ammo code

Posts 16 of 6 · Page 1 of 1
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
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;
}
thanks m8 =D



u know is it possible somehow?? it will have the display of a ammo crate sign?
Ive looked for that myself too sadly :<
I'll expiriment some later
Watch the AI Zombiemod... There is a Ammocrate falling down after each round, maybe you can use parts of that code.
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
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?