At last I now know where I wrong but I don't know that will I find a way to fix it. However my mistake is this else between Secondary weapon and Primary weapon. I translate the code and the mistake is - for a primary weapon "if (f_item_distance<50) then pickup secondary weapon but(the error) else if (f_item_distance<50) is not "<50" then pickup primary weapon. I think that this is the reason that make the bots to drop his weapons from very big distance before the reach the weapon.
Now I will try to fix it.
Thanks to all who help me
