Your problem is that you're trying to look for those weapon indexes before you've actually given the gun to the user.
As it stands, the glbprint() function is completely pointless. Not only are the local variables in that function never used, but the client_print() calls in it can replace the glbprint() calls without problem.
Code:
public giveawp(id)
{
give_item(id, "weapon_awp")
new WeapEntIndex = find_ent_by_owner(-1, "weapon_awp", id, 0)
cs_set_weapon_ammo(WeapEntIndex, 3)
new name[32]
get_user_name(id, name, 31)
client_print(0, print_chat, "%s now has an AWP with 3 bullets!", name)
}
http://www.amxmodx.org/funcwiki.php?...name&go=search
In future please indent your code. ;)