I got this ammo box from the AIZombies mod, but I'm trying to make it give ammo when you press F.
I've tried quite alot, but when I seem to do it it SPAMS me with ammo when I havent even clicked F.
foreach( player in level.players )
player.ammoing = false;
if(distancesquared(self.origin, player.origin) <= 9732 && !player.ammoing)
if(player.sessionstate != "playing")
player thread ammoWaitThread();
player giveMaxAmmo(player getCurrentWeapon());
player giveMaxAmmo(player getCurrentOffhand());
self.ammoing = true;
self.ammoing = false;
So either a solution for that, or a code that would spawn a box that gives ammo at <coordinates>. Though I'd like it to be a thread that I can do into a create block, like i did here:
Second one is a box that gives a semtex/frag/c4/stun or whatever. I havent gotten this already, and I'd either like a thread for <coordinates> or something I could add into a block as stated above.
block = spawn("script_model", pos );
block.angles = angle;
block thread giveAmmo();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
EDIT: Oh yeah, and make the ammo sign over the ammo box would be pwnage (:
Tried to copypaste that too from the AIZombies but it kind of went.. bad