[Solved]Problem with ammo box...

Posts 1–4 of 4 · Page 1 of 1
[Solved]Problem with ammo box...
I can see the text but I pressed F and nothing happen...
What's wrong with my code?
Code:
CreateAbox(pos, angle)
{
	box = spawn("script_model", pos );
	box setModel("com_bomb_objective");
	box.angles = angle;
	box Solid();
	for(;;)
	{		
		foreach(player in level.players)
		{
			if(Distance(box.origin, player.origin) <= 50)
			{
				player setLowerMessage("CPHint","Press ^3[{+activate}]^7 to refill ammo!");
				if(player UseButtonPressed())
				{
					maps\mp\killstreaks\_airdrop::refillAmmo();
					self playLocalSound( "ammo_crate_use" );
				}
			}
                        else
                        {
                            player clearLowerMessage("CPHint",1);
                        }
		}
	}
	wait 0.01;
}
Code:
self playLocalSound( "ammo_crate_use" );
Should be player not self.
/marked as solved
OMG master.... Your fixing everything!!!
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us