Create an action for the pickup weapon
like this:
Code:
//skill1 WeaponID 0
//skill2 PickupDist 100
action weapon_pickup()
{
	while(vec_dist(my.x,player.x) < my.PickupDist)
	{
		my.pan += time_step; //Let the Weapon rotate
		wait(1);
	}
	switch_active_weapon(my.skill1);
	ent_remove(me);
}
}



now you need the weapon change code:
Code:
var active_weapon_id = 0;
var active_weapon = 0;
var weapons[2];

//Switches the active weapon
function switch_active_weapon(var weapon_id)
{
	weapons[active_weapon] = weapon_id;
}

//Used to cycle the Weapons
function weapon_changer_startup()
{
	while(1)
	{
		active_weapon = cycle(active_weapon + mickey.z / 120,0,2); //Change Weapon with mousewheel
		active_weapon_id = weapons[active_weapon];
		wait(1);
	}
}

// Use to shoot
function shoot()
{
	switch(active_weapon_id)
	{
		case 0:
			//Weapon with first ID
			break;
		case 1:
			//Weapon with second ID
			break;
		case n:
			//Weapon with n ID
			break;
		default:
			//No Weapon or Weapon not defined
			break;
	}
}




Visit my site: www.masterq32.de