if(GetPlayerMoney(playerid) >= YOUR_GUN_PRICE_HERE){ //player can afford the gun}else{ //player can't afford the gun}