[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;
}
OMG master.... Your fixing everything!!!