I think your code switches weapons very fast:
everytime the loop runs, and you still have the q key pressed, the weapons will switch again and again.


Code:
function switch_weapons()
{
   	v_selected_wpn += 1;
		v_selected_wpn %= 2;
	
	if (v_selected_wpn == 1)
	{
		STRING* str_selected_number = "2";
	}
	if (v_selected_wpn == 0)
	{
		STRING* str_selected_number = "1";
	}
}



and then somewhere else:

Code:
on_q = switch_weapons;



this makes your code run only once, when you press the q button

Last edited by Roel; 06/11/11 12:59.

Check out the throwing game here: The throwing game